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 GPU pathtracing under Windows #105

Merged
merged 2 commits into from
Feb 5, 2020

Conversation

mworchel
Copy link
Contributor

@mworchel mworchel commented Feb 4, 2020

As discussed in PR #103, GPU pathtracing did not properly work under Windows because of CUDA crashes. It seems like calling the pow function with argument types (double, float) in CUDA code triggers a crash. While the exact cause is still unknown, a fix is to explicitly make sure, the overload pow(double, double) is called by passing the right argument types.

The PR not only fixes the forward pass but also the backward pass, as seen in this super fancy pose_estimation sample:
animation

@mworchel
Copy link
Contributor Author

mworchel commented Feb 4, 2020

Tested and working on two machines with different GPUs. Just for reference, my CUDA version is 10.1.

EDIT: Tested on a third machine.

@mworchel mworchel marked this pull request as ready for review February 4, 2020 16:08
@BachiLi
Copy link
Owner

BachiLi commented Feb 4, 2020

Thanks a lot!! I'll suggest using Real(1) instead of 1.0 so that we can switch to float if we want.

@mworchel
Copy link
Contributor Author

mworchel commented Feb 5, 2020

Fixed by 77f844e.

@BachiLi
Copy link
Owner

BachiLi commented Feb 5, 2020

Thanks!

@BachiLi BachiLi merged commit b704e1d into BachiLi:master Feb 5, 2020
BachiLi added a commit that referenced this pull request Feb 7, 2020
Fix derivative computation on windows (#105)
Add getter and setter for print_timing (#106)
Add triangle_id in the channels (#107)
@mworchel mworchel deleted the windows-pathtracing branch February 15, 2020 13:28
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