-
Notifications
You must be signed in to change notification settings - Fork 48
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 wgpu compiler dynamic and determined by adapter #470
Make wgpu compiler dynamic and determined by adapter #470
Conversation
// Minimum supported | ||
max_shared_memory_size: 49152, |
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 the comment right?
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 used to just be hardcoded to that for both CUDA and HIP, so I assume it was the minimum supported? I now check the actual minimum for CUDA (since it's almost always higher than 48k), but I don't fully understand the HIP code and can't really test if my code works so I used the hardcoded constant from before.
compilation_options: &Self::CompilationOptions, | ||
mode: ExecutionMode, | ||
) -> Self::Representation { | ||
match self { |
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.
I guess you'll need an extra allow
for clippy when spirv
isn't enabled.
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.
not sure what you mean, I don't see any clippy warnings on either CI or locally with SPIR-V disabled
Since this touches relevant code parts I'll mention this issue: #355 Would be nice if possible to get hold of a client when doing device sharing. |
This PR doesn't touch the part that selects an adapter (which is where it errors), so I'd put that in a separate PR. |
Makes the
cubecl-wgpu
compiler dynamic and automatically checks the backend on initialization.Breaking changes
Manually compiling kernels requires a signature change from
Compiler::compile(...)
toCompiler::default().compile(...)
.