Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix userdata derivatives for interpolated params on GPU #1685

Merged

Conversation

lecocqp
Copy link
Contributor

@lecocqp lecocqp commented May 19, 2023

Description

Following #1657, it turns out we forgot to zero initialize the userdata derivatives for the optix path.
This leads to some rendering glitches caused by the memory garbage left in those derivatives.

Tests

Checklist:

  • I have read the contribution guidelines.
  • I have previously submitted a Contributor License Agreement.
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite (adding new test cases if necessary).
  • My code follows the prevailing code style of this project.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 19, 2023

CLA Missing ID CLA Not Signed

@lgritz
Copy link
Collaborator

lgritz commented May 20, 2023

Pascal, you can fix the DCO by adding a sign-off:

git commit --amend -s
git push origin <branchname> --force

For the EasyCLA, it seems you weren't on the SPI approved list. (How did that happen? Is this really your first OSL PR?) Anyway, I added you, so you should see something to click that will let you accept it and they it will be cleared for this and any future PRs.

@lgritz
Copy link
Collaborator

lgritz commented May 20, 2023

Don't worry about the two test failures for icc and icx -- that's just Intel's servers being flaky and the CI runs unable to download those compilers. It comes and goes.

Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code change LGTM, thanks for the fix.
I need the CLA and DCO fixed before I can merge.

@lecocqp lecocqp force-pushed the fix-gpu-userdata-derivatives branch from d8c2c60 to 0bc7384 Compare May 20, 2023 00:40
@lecocqp
Copy link
Contributor Author

lecocqp commented May 20, 2023

Yes, very first OSL PR, I only contributed to OIIO so far. For the EasyCLA should I proceed as a Corporate or Individual contributor?

@lgritz
Copy link
Collaborator

lgritz commented May 20, 2023

Corporate, tell it you're with Sony Imageworks, I've already put you on our list.

@lecocqp
Copy link
Contributor Author

lecocqp commented May 20, 2023

I completed the CLA authorization request. Is there something else I need to do for getting the CLA failure resolved? Another push force commit?

@lgritz
Copy link
Collaborator

lgritz commented May 20, 2023

I'm not sure, I'll try to figure it out.

@lgritz
Copy link
Collaborator

lgritz commented May 20, 2023

Hmmm, can you just diddle it and re-push:

git commit --amend       # force a sha change, don't edit anything
git push origin blah --force

maybe that will get it unstuck.

@lecocqp lecocqp force-pushed the fix-gpu-userdata-derivatives branch from 0bc7384 to 3473d97 Compare May 20, 2023 02:15
@lecocqp
Copy link
Contributor Author

lecocqp commented May 20, 2023

I re-pushed the branch but same thing. The EasyCLA process says this: "The Corporate CLA process requires you to be approved by your organization's CLA Manager. A CLA Manager at your organization will receive your request via email immediately after you submit it. To expedite the process, you can follow up with them directly.".

Maybe you (or someone else?) have receive an email for approving the authorization?

@lgritz
Copy link
Collaborator

lgritz commented May 20, 2023

I am the CLA manager for the company. I see you already on the approved list, and there are no additional requests waiting for my approval. If the rest of the CI passes, I may be able to just force a merge and override the check. I just don't know why EasyCLA is still giving me trouble. @jmertic do you have any insights?

@lgritz
Copy link
Collaborator

lgritz commented May 20, 2023

Pascal, is it possible that the email associated with the commit doesn't match the email associated with your github account?

@lecocqp
Copy link
Contributor Author

lecocqp commented May 20, 2023

Oh you're right! I didn't realize that the commit was signed off with my Imageworks email instead of my gmail address. I'll look into it tomorrow.

@lgritz
Copy link
Collaborator

lgritz commented May 20, 2023

I think you should be able to fix with

git commit --amend --author "Pascal Lecocq <your@email>" -s

and then re-push --force

But also, I just added your work email to the permissions list, so it may just work with another force push? (Though changing the email to be consistent will make it so that future PRs all look like the same person instead of you appearing under multiple aliases.)

Signed-off-by: Pascal Lecocq <pascal.lecocq@gmail.com>
@lecocqp lecocqp force-pushed the fix-gpu-userdata-derivatives branch from 3473d97 to a5342ab Compare May 20, 2023 17:02
@lecocqp
Copy link
Contributor Author

lecocqp commented May 20, 2023

I setup my personal email for that specific repo in the .git/config using a [user] tag. I just pushed another commit, let's see how it goes.

Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM. I know you're authorized under our CLA, so I'm going to force the merge even if it doesn't work this time. We'll figure it out next time if it's still not working (it may be fine if a PR is first started after you have been added and with the emails consistent).

@lgritz lgritz merged commit 5c49a7c into AcademySoftwareFoundation:main May 20, 2023
chellmuth pushed a commit to chellmuth/OpenShadingLanguage that referenced this pull request Sep 6, 2024
Highlights:

  * GPU/OptiX support of ReParameter (AcademySoftwareFoundation#1686)
  * Fix OptiX userdata derivatives for interpolated params on GPU (AcademySoftwareFoundation#1685)
  * Fix userdata binding corner case (AcademySoftwareFoundation#1673)
  * Fix constant float values being converted to ints (AcademySoftwareFoundation#1674)

Restock the abi dump file as we push to 1.13.4.

See merge request spi/dev/3rd-party/osl-feedstock!48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants