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

Make tuple types work in autodiff. #4923

Merged
merged 8 commits into from
Aug 28, 2024
Merged

Conversation

csyonghe
Copy link
Collaborator

@csyonghe csyonghe commented Aug 27, 2024

Closes #4891.

  • Add extension declaration in stdlib for tuple types.
  • Implement differentiation logic for tuple types, both in the frontend and in the IR.
  • Make sure UpdateElement access keys on tuple types are lowered to struct keys when lowering tuple types.

@csyonghe csyonghe added the pr: non-breaking PRs without breaking changes label Aug 27, 2024
saipraveenb25
saipraveenb25 previously approved these changes Aug 27, 2024
Copy link
Collaborator

@saipraveenb25 saipraveenb25 left a comment

Choose a reason for hiding this comment

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

Everything looks good to me!

We do eventually need to figure out how to do optional constraints...

jkwak-work
jkwak-work previously approved these changes Aug 27, 2024
Copy link
Collaborator

@jkwak-work jkwak-work left a comment

Choose a reason for hiding this comment

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

Looks good to me.

source/slang/slang-ir-autodiff.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator Author

@csyonghe csyonghe left a comment

Choose a reason for hiding this comment

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

Addressed reviews.

@csyonghe csyonghe dismissed stale reviews from jkwak-work and saipraveenb25 via 59e24ba August 27, 2024 23:07
@csyonghe csyonghe merged commit 638e5fb into shader-slang:master Aug 28, 2024
11 of 12 checks passed
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.

Implement autodiff support for Tuple types.
3 participants