Added end to end implementation of OpMult with postSubmit calls on sequence
This commit is contained in:
parent
03688bc5b2
commit
8f6078c422
8 changed files with 62 additions and 8 deletions
25
shaders/glsl/opmult.comp
Normal file
25
shaders/glsl/opmult.comp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#version 450
|
||||
|
||||
layout(binding = 0) buffer tensorLhs {
|
||||
uint valuesLhs[ ];
|
||||
};
|
||||
|
||||
layout(binding = 1) buffer tensorRhs {
|
||||
uint valuesRhs[ ];
|
||||
};
|
||||
|
||||
layout(binding = 2) buffer tensorOutput {
|
||||
uint valuesOutput[ ];
|
||||
};
|
||||
|
||||
// TODO: Explore how to make layout inside shader dynamic
|
||||
layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
void main()
|
||||
{
|
||||
uint index = gl_GlobalInvocationID.x;
|
||||
|
||||
valuesOutput[index] = valuesLhs[index] * valuesRhs[index];
|
||||
}
|
||||
|
||||
|
||||
BIN
shaders/glsl/opmult.comp.spv
Executable file
BIN
shaders/glsl/opmult.comp.spv
Executable file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue