You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const gpu = new GPU();
const multiplyMatrix = gpu.createKernel(function(a, b) {
let sum = 0;
for (let i = 0; i < 512; i++) {
sum += a[this.thread.y][i] * b[i][this.thread.x];
}
return sum;
}).setOutput([512, 512]);
const c = multiplyMatrix(a, b);
I am using your example for matrix multiplication. For 512x512 everything is ok, but at 1024x1024 I get it.
Where does it happen?
All the time.
How do we replicate the issue?
const gpu = new GPU();
const multiplyMatrix = gpu.createKernel(function(a, b) {
let sum = 0;
for (let i = 0; i < 1000000; i++) {
sum += a[this.thread.y][i] * b[i][this.thread.x];
}
return sum;
}).setOutput([1000000, 1000000]);
const c = multiplyMatrix(a, b);
How important is this (1-5)?
3
Expected behavior (i.e. solution)
Throwing an out-of-memory error instead of trying to execute.
Other Comments
The text was updated successfully, but these errors were encountered:
What is wrong?
I am using your example for matrix multiplication. For 512x512 everything is ok, but at 1024x1024 I get it.
Where does it happen?
All the time.
How do we replicate the issue?
How important is this (1-5)?
3
Expected behavior (i.e. solution)
Throwing an out-of-memory error instead of trying to execute.
Other Comments
The text was updated successfully, but these errors were encountered: