You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
631 B
24 lines
631 B
12 months ago
|
#version 450
|
||
|
// clang-format off
|
||
|
|
||
|
// The number of threads spawned per-workgroup, these are substituted by the
|
||
|
// program pre-compilation
|
||
|
layout(
|
||
|
local_size_x = __lcsize_x__,
|
||
|
local_size_y = __lcsize_y__,
|
||
|
local_size_z = __lcsize_z__
|
||
|
) in;
|
||
|
|
||
|
// The buffers are provided via the tensors
|
||
|
layout(binding = 0) buffer tensorA { float matA[]; };
|
||
|
layout(binding = 1) buffer tensorB { float matB[]; };
|
||
|
layout(binding = 2) buffer tensorC { float matC[]; };
|
||
|
|
||
|
// specialization constants
|
||
|
layout(constant_id = 0) const float tensor_size_f = 0;
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
uint index = gl_GlobalInvocationID.x;
|
||
|
o[index] = a[index] * b[index];
|
||
|
}
|