summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/execution/expression/binary/af_matrix_matrix_multiplication.cache.js
blob: a313cea99258db928533dbcb4f6d939ebd06e1f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
**/import { FP } from '../../../../util/floating_point.js';import { sparseMatrixF64Range } from '../../../../util/math.js';import { selectNCases } from '../case.js';
import { makeCaseCache } from '../case_cache.js';

// Cases: matKxR_matCxK
const mat_mat_cases = [2, 3, 4].
flatMap((k) =>
[2, 3, 4].flatMap((cols) =>
[2, 3, 4].map((rows) => ({
  [`mat${k}x${rows}_mat${cols}x${k}`]: () => {
    return selectNCases(
      'binary/af_matrix_matrix_multiplication',
      10,
      FP.abstract.generateMatrixPairToMatrixCases(
        sparseMatrixF64Range(k, rows),
        sparseMatrixF64Range(cols, k),
        'finite',
        // Matrix-matrix multiplication has an inherited accuracy, so abstract is only expected to be as accurate as f32
        FP.f32.multiplicationMatrixMatrixInterval
      )
    );
  }
}))
)
).
reduce((a, b) => ({ ...a, ...b }), {});

export const d = makeCaseCache('binary/af_matrix_matrix_multiplication', mat_mat_cases);