Removed TensorInfo from example shader

This commit is contained in:
adrien 2026-05-18 16:45:55 +02:00
parent c62bead6e9
commit 3d9cb4df04

View File

@ -3,11 +3,7 @@ enable f16;
@group(0) @binding(0) var<storage, read> A: array<f16>;
@group(0) @binding(1) var<storage, read> B: array<f16>;
@group(0) @binding(2) var<storage, read_write> C: array<f16>;
struct TensorInfo {
size: u32,
};
@group(0) @binding(3) var<uniform> info: TensorInfo;
@group(0) @binding(3) var<uniform> size: u32;
@compute @workgroup_size(256)
fn main(
@ -21,7 +17,7 @@ fn main(
var index = global_id.x;
// 3. Stride through the tensor elements
while (index < info.size) {
while (index < size) {
C[index] = A[index] + B[index];
index += total_threads; // Jump forward by the total thread count
}