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

Correct IR generation for no-diff pointer type #5976

Merged
merged 6 commits into from
Jan 2, 2025

Conversation

kaizhangNV
Copy link
Contributor

@kaizhangNV kaizhangNV commented Dec 31, 2024

Close #5805.

There is an issue on checking whether a pointer type parameter is no_diff, we should first check whether this parameter is an Attribute type first, then check the data type.

In the back-propagate pass, for the pointer type parameter, we should load this parameter to a temp variable, then pass it to the primal function call. Otherwise, the temp variable will no be initialized, which will cause the following calculation wrong.

There is an issue on checking whether a pointer type parameter
is no_diff, we should first check whether this parameter is
an Attribute type first, then check the data type.

In the back-propagate pass, for the pointer type parameter, we should
load this parameter to a temp variable, then pass it to the primal
function call. Otherwise, the temp variable will no be initialized,
which will cause the following calculation wrong.
@kaizhangNV kaizhangNV requested a review from a team as a code owner December 31, 2024 23:13
@kaizhangNV kaizhangNV added the pr: non-breaking PRs without breaking changes label Dec 31, 2024
csyonghe
csyonghe previously approved these changes Jan 2, 2025
@kaizhangNV
Copy link
Contributor Author

There is some error in the deubgprintf

@kaizhangNV kaizhangNV merged commit d48cd13 into shader-slang:master Jan 2, 2025
16 checks passed
@kaizhangNV kaizhangNV deleted the ad_issue branch January 8, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pointers as parameters to differentiable functions cause compiler to crash
2 participants