-
Notifications
You must be signed in to change notification settings - Fork 127
refactor: Constants #1121
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
refactor: Constants #1121
Conversation
| pub scope: Scope, | ||
| } | ||
|
|
||
| impl If { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we don't need that now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was from the ancient pre-compiler version of CubeCL, so it hadn't been used for a long time. It was for the old assembly macro.
Small refactor to constants in the IR, to make code cleaner and allow for more effective inlining of constant lines.
Instead of combining the kind and value into the enum, makes the value typeless and uses the
Variable::tyfield to carry the type information. This allows using lined and other more complex types, and also simplifies handling since most use cases were ignoring the kind anyways, and when the type is needed it's already available from thetyfield on the Variable.Constants are now converted to the target type on construction, and the now redundant sanitize code is removed.
Also fixes some non-fatal validation errors with Vulkan atomics.
Validate your PR with burn.
It is important that you make sure that you don't introduce any bugs in burn.
Instructions