We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Some operations require their metadata struct to be constructed at runtime (we don't know the size of the metadata struct at compile time).
Concat is a good example, as there may be $0..n$ tensors being concatenated. Therefore, we need some way of building the struct at runtime, whilst ensuring that we maintain the correct WGSL memory layout (play around here: https://webgpufundamentals.org/webgpu/lessons/resources/wgsl-offset-computer.html).
I'm currently thinking of the following:
use indexmap::IndexMap; pub struct MetaMap(IndexMap<K, V, S = RandomState>) where V: encase::ShaderSize
We can then convert this into a [u8] with members padded and offset correctly.
[u8]
We would have needed to do this when we were JITting anyway.
The text was updated successfully, but these errors were encountered:
Better solution: teoxoy/encase#46
Field rearranging would be interesting here, but it would save a few bytes, not worth it.
Sorry, something went wrong.
#137 solved, but isn't perfect. Thanks to @cwfitzgerald for the PR on encase.
No branches or pull requests
Some operations require their metadata struct to be constructed at runtime (we don't know the size of the metadata struct at compile time).
Concat is a good example, as there may be$0..n$ tensors being concatenated.
Therefore, we need some way of building the struct at runtime, whilst ensuring that we maintain the correct WGSL memory layout (play around here: https://webgpufundamentals.org/webgpu/lessons/resources/wgsl-offset-computer.html).
I'm currently thinking of the following:
We can then convert this into a
[u8]
with members padded and offset correctly.We would have needed to do this when we were JITting anyway.
The text was updated successfully, but these errors were encountered: