Skip to content

GPU and CPU version outputs differ  #382

@robertleeplummerjr

Description

@robertleeplummerjr

I'm getting different outputs for this scenario which is mirrored in CPU and GPU: https://jsfiddle.net/robertleeplummerjr/qhx8k7da/20/

The kernel function looks like:

function newRunMe(a, b, c, lda, ldb, ldc, m, n, k) {
  const cIndex = (ldc * this.thread.y) + this.thread.x;
  let sum = c[cIndex] * this.constants.beta;

  for (let i = 0; i < k; i++) {
    const aIndex = (lda * i) + this.thread.x;
    const bIndex = (ldb * this.thread.y) + i;
    sum += a[aIndex] * this.constants.alpha * b[bIndex];
  }

  return sum;
}

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions