Skip to content

Commit

Permalink
wgsl: Add scalarRange and sparseScalarRange to FPTraits API (#3182)
Browse files Browse the repository at this point in the history
There is also a bunch of refactoring of fullF*Range to scalarF*Range
and such to make things clearer, since it always confuses people that
fullF32Range only returns a subset of f32.

Issue #3174
  • Loading branch information
zoddicus authored Nov 22, 2023
1 parent 1390017 commit 35005a9
Show file tree
Hide file tree
Showing 101 changed files with 1,002 additions and 1,266 deletions.
208 changes: 104 additions & 104 deletions src/resources/cache/hashes.json
Original file line number Diff line number Diff line change
@@ -1,106 +1,106 @@
{
"webgpu/shader/execution/binary/af_addition.bin": "9ad2b249",
"webgpu/shader/execution/binary/af_logical.bin": "ae4d0245",
"webgpu/shader/execution/binary/af_division.bin": "d3376690",
"webgpu/shader/execution/binary/af_matrix_addition.bin": "e3bc27b",
"webgpu/shader/execution/binary/af_matrix_subtraction.bin": "9cc3291c",
"webgpu/shader/execution/binary/af_multiplication.bin": "17f2a567",
"webgpu/shader/execution/binary/af_remainder.bin": "5582cf38",
"webgpu/shader/execution/binary/af_subtraction.bin": "de31266e",
"webgpu/shader/execution/binary/f16_addition.bin": "6cd9e104",
"webgpu/shader/execution/binary/f16_logical.bin": "8b97670c",
"webgpu/shader/execution/binary/f16_division.bin": "10202143",
"webgpu/shader/execution/binary/f16_matrix_addition.bin": "63f361ba",
"webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "47fb7bc",
"webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "89b49d2f",
"webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "1c7c2571",
"webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "551ba6cc",
"webgpu/shader/execution/binary/f16_multiplication.bin": "e5c32f73",
"webgpu/shader/execution/binary/f16_remainder.bin": "404927e7",
"webgpu/shader/execution/binary/f16_subtraction.bin": "64188676",
"webgpu/shader/execution/binary/f32_addition.bin": "741c7a51",
"webgpu/shader/execution/binary/f32_logical.bin": "c761067f",
"webgpu/shader/execution/binary/f32_division.bin": "69aeed3a",
"webgpu/shader/execution/binary/f32_matrix_addition.bin": "10082f79",
"webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "e82ac781",
"webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "2bd684f",
"webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "48da0bda",
"webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "8776a032",
"webgpu/shader/execution/binary/f32_multiplication.bin": "565152c2",
"webgpu/shader/execution/binary/f32_remainder.bin": "87e5fe4e",
"webgpu/shader/execution/binary/f32_subtraction.bin": "fd539f36",
"webgpu/shader/execution/binary/i32_arithmetic.bin": "d385729b",
"webgpu/shader/execution/binary/i32_comparison.bin": "a212a9e5",
"webgpu/shader/execution/binary/u32_arithmetic.bin": "d9387c9a",
"webgpu/shader/execution/binary/u32_comparison.bin": "cb609171",
"webgpu/shader/execution/abs.bin": "3161e44d",
"webgpu/shader/execution/acos.bin": "dc04c013",
"webgpu/shader/execution/acosh.bin": "5f2d5d46",
"webgpu/shader/execution/asin.bin": "7dcbb4e4",
"webgpu/shader/execution/asinh.bin": "a7826495",
"webgpu/shader/execution/atan.bin": "c38ef29f",
"webgpu/shader/execution/atan2.bin": "e3fe2caf",
"webgpu/shader/execution/atanh.bin": "7bbb6084",
"webgpu/shader/execution/bitcast.bin": "87bfa9e8",
"webgpu/shader/execution/ceil.bin": "e43ad5bb",
"webgpu/shader/execution/clamp.bin": "f59d5615",
"webgpu/shader/execution/cos.bin": "84722156",
"webgpu/shader/execution/cosh.bin": "cf071209",
"webgpu/shader/execution/cross.bin": "bf2f7adf",
"webgpu/shader/execution/degrees.bin": "c4254ee0",
"webgpu/shader/execution/determinant.bin": "e5fe08db",
"webgpu/shader/execution/distance.bin": "89368db",
"webgpu/shader/execution/dot.bin": "5902ed6a",
"webgpu/shader/execution/exp.bin": "fdbe406e",
"webgpu/shader/execution/exp2.bin": "69983959",
"webgpu/shader/execution/faceForward.bin": "56141bff",
"webgpu/shader/execution/floor.bin": "cc77695",
"webgpu/shader/execution/fma.bin": "63b076cc",
"webgpu/shader/execution/fract.bin": "46113f72",
"webgpu/shader/execution/frexp.bin": "7a578d2d",
"webgpu/shader/execution/inverseSqrt.bin": "b89e412c",
"webgpu/shader/execution/ldexp.bin": "2e387a8b",
"webgpu/shader/execution/length.bin": "1cf5a3d0",
"webgpu/shader/execution/log.bin": "d29e19c4",
"webgpu/shader/execution/log2.bin": "8493434a",
"webgpu/shader/execution/max.bin": "b3ac49b0",
"webgpu/shader/execution/min.bin": "7e92bdf4",
"webgpu/shader/execution/mix.bin": "a242b580",
"webgpu/shader/execution/modf.bin": "60c1b4c2",
"webgpu/shader/execution/normalize.bin": "d1c8e8ce",
"webgpu/shader/execution/pack2x16float.bin": "acd2d4cc",
"webgpu/shader/execution/pow.bin": "bd5ad2f1",
"webgpu/shader/execution/quantizeToF16.bin": "e1d5b687",
"webgpu/shader/execution/radians.bin": "ab8ffce",
"webgpu/shader/execution/reflect.bin": "21b95d6c",
"webgpu/shader/execution/refract.bin": "673f11a5",
"webgpu/shader/execution/round.bin": "e258877c",
"webgpu/shader/execution/saturate.bin": "ea81a5bb",
"webgpu/shader/execution/sign.bin": "506ea55a",
"webgpu/shader/execution/sin.bin": "a7343188",
"webgpu/shader/execution/sinh.bin": "958eb14d",
"webgpu/shader/execution/smoothstep.bin": "53d2d03f",
"webgpu/shader/execution/sqrt.bin": "bee99723",
"webgpu/shader/execution/step.bin": "5fd9e33e",
"webgpu/shader/execution/tan.bin": "7f4bdf13",
"webgpu/shader/execution/tanh.bin": "db866ad7",
"webgpu/shader/execution/transpose.bin": "5841777f",
"webgpu/shader/execution/trunc.bin": "7e39b544",
"webgpu/shader/execution/unpack2x16float.bin": "836d1dff",
"webgpu/shader/execution/unpack2x16snorm.bin": "c29710",
"webgpu/shader/execution/unpack2x16unorm.bin": "fee2226a",
"webgpu/shader/execution/unpack4x8snorm.bin": "fc72f2ee",
"webgpu/shader/execution/unpack4x8unorm.bin": "2e335e83",
"webgpu/shader/execution/unary/af_arithmetic.bin": "b332ab15",
"webgpu/shader/execution/unary/af_assignment.bin": "9cd4b66",
"webgpu/shader/execution/unary/bool_conversion.bin": "8916fbb",
"webgpu/shader/execution/unary/f16_arithmetic.bin": "5448a82c",
"webgpu/shader/execution/unary/f16_conversion.bin": "1ad05153",
"webgpu/shader/execution/unary/f32_arithmetic.bin": "a2e45ea0",
"webgpu/shader/execution/unary/f32_conversion.bin": "fa062da3",
"webgpu/shader/execution/unary/i32_arithmetic.bin": "2bba8fe4",
"webgpu/shader/execution/unary/i32_complement.bin": "caa954b2",
"webgpu/shader/execution/unary/i32_conversion.bin": "22a36f9e",
"webgpu/shader/execution/unary/u32_complement.bin": "fabf96c0",
"webgpu/shader/execution/unary/u32_conversion.bin": "ec57b500"
"webgpu/shader/execution/binary/af_addition.bin": "5bcc542",
"webgpu/shader/execution/binary/af_logical.bin": "e44143c0",
"webgpu/shader/execution/binary/af_division.bin": "62a4177a",
"webgpu/shader/execution/binary/af_matrix_addition.bin": "a5069db6",
"webgpu/shader/execution/binary/af_matrix_subtraction.bin": "7813d4bc",
"webgpu/shader/execution/binary/af_multiplication.bin": "bb76a321",
"webgpu/shader/execution/binary/af_remainder.bin": "c1095ea1",
"webgpu/shader/execution/binary/af_subtraction.bin": "84d7c81c",
"webgpu/shader/execution/binary/f16_addition.bin": "4ad63c83",
"webgpu/shader/execution/binary/f16_logical.bin": "978dd1ef",
"webgpu/shader/execution/binary/f16_division.bin": "e80548a6",
"webgpu/shader/execution/binary/f16_matrix_addition.bin": "796d135a",
"webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "c81c7770",
"webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "adc1bddc",
"webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "e19f2fe",
"webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "535c6b56",
"webgpu/shader/execution/binary/f16_multiplication.bin": "3edc0aa9",
"webgpu/shader/execution/binary/f16_remainder.bin": "2f2492e4",
"webgpu/shader/execution/binary/f16_subtraction.bin": "d9a6b041",
"webgpu/shader/execution/binary/f32_addition.bin": "5fc8796d",
"webgpu/shader/execution/binary/f32_logical.bin": "88c065b6",
"webgpu/shader/execution/binary/f32_division.bin": "38f2e9b6",
"webgpu/shader/execution/binary/f32_matrix_addition.bin": "a0183a6e",
"webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "27131729",
"webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "1e60801c",
"webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "999ef3aa",
"webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "4a4544c8",
"webgpu/shader/execution/binary/f32_multiplication.bin": "3cf38e52",
"webgpu/shader/execution/binary/f32_remainder.bin": "a3a1e05c",
"webgpu/shader/execution/binary/f32_subtraction.bin": "f5344626",
"webgpu/shader/execution/binary/i32_arithmetic.bin": "a65d1ba3",
"webgpu/shader/execution/binary/i32_comparison.bin": "65dff959",
"webgpu/shader/execution/binary/u32_arithmetic.bin": "8ca20dc6",
"webgpu/shader/execution/binary/u32_comparison.bin": "29afb233",
"webgpu/shader/execution/abs.bin": "2b89d10a",
"webgpu/shader/execution/acos.bin": "4e088b3a",
"webgpu/shader/execution/acosh.bin": "e0a7c604",
"webgpu/shader/execution/asin.bin": "931b790a",
"webgpu/shader/execution/asinh.bin": "a9026e52",
"webgpu/shader/execution/atan.bin": "299e9e8f",
"webgpu/shader/execution/atan2.bin": "36e31bcc",
"webgpu/shader/execution/atanh.bin": "bc2715ef",
"webgpu/shader/execution/bitcast.bin": "9e97a7eb",
"webgpu/shader/execution/ceil.bin": "fe6b7869",
"webgpu/shader/execution/clamp.bin": "a227d3d2",
"webgpu/shader/execution/cos.bin": "2a991346",
"webgpu/shader/execution/cosh.bin": "ea3c41d8",
"webgpu/shader/execution/cross.bin": "1a1b8321",
"webgpu/shader/execution/degrees.bin": "efd95d31",
"webgpu/shader/execution/determinant.bin": "4325eef9",
"webgpu/shader/execution/distance.bin": "45854a68",
"webgpu/shader/execution/dot.bin": "b06b2ac1",
"webgpu/shader/execution/exp.bin": "9e417842",
"webgpu/shader/execution/exp2.bin": "657559cb",
"webgpu/shader/execution/faceForward.bin": "22e36217",
"webgpu/shader/execution/floor.bin": "4bded93a",
"webgpu/shader/execution/fma.bin": "259e97ec",
"webgpu/shader/execution/fract.bin": "1844053e",
"webgpu/shader/execution/frexp.bin": "795736a4",
"webgpu/shader/execution/inverseSqrt.bin": "39d0ad9d",
"webgpu/shader/execution/ldexp.bin": "9cdba877",
"webgpu/shader/execution/length.bin": "f2971413",
"webgpu/shader/execution/log.bin": "dec7e23a",
"webgpu/shader/execution/log2.bin": "d24dc283",
"webgpu/shader/execution/max.bin": "346e1e88",
"webgpu/shader/execution/min.bin": "2eee31dd",
"webgpu/shader/execution/mix.bin": "7d10c2a9",
"webgpu/shader/execution/modf.bin": "13fff4a7",
"webgpu/shader/execution/normalize.bin": "55f5763b",
"webgpu/shader/execution/pack2x16float.bin": "fc207ec6",
"webgpu/shader/execution/pow.bin": "74f4fe3c",
"webgpu/shader/execution/quantizeToF16.bin": "6f2bf65a",
"webgpu/shader/execution/radians.bin": "3c834c9d",
"webgpu/shader/execution/reflect.bin": "7b87f821",
"webgpu/shader/execution/refract.bin": "e52fa44a",
"webgpu/shader/execution/round.bin": "5d5c72e8",
"webgpu/shader/execution/saturate.bin": "4170af8d",
"webgpu/shader/execution/sign.bin": "e23244e1",
"webgpu/shader/execution/sin.bin": "4a21c66a",
"webgpu/shader/execution/sinh.bin": "e0ed55e8",
"webgpu/shader/execution/smoothstep.bin": "44e4f53b",
"webgpu/shader/execution/sqrt.bin": "bd53552f",
"webgpu/shader/execution/step.bin": "b7dfcc93",
"webgpu/shader/execution/tan.bin": "4a473cc6",
"webgpu/shader/execution/tanh.bin": "45e60ddf",
"webgpu/shader/execution/transpose.bin": "5186fe5b",
"webgpu/shader/execution/trunc.bin": "bfc3ecf9",
"webgpu/shader/execution/unpack2x16float.bin": "302e7cdd",
"webgpu/shader/execution/unpack2x16snorm.bin": "51216313",
"webgpu/shader/execution/unpack2x16unorm.bin": "8bd401b2",
"webgpu/shader/execution/unpack4x8snorm.bin": "4e4985a6",
"webgpu/shader/execution/unpack4x8unorm.bin": "16be9079",
"webgpu/shader/execution/unary/af_arithmetic.bin": "9fd5946a",
"webgpu/shader/execution/unary/af_assignment.bin": "81b91716",
"webgpu/shader/execution/unary/bool_conversion.bin": "699a8913",
"webgpu/shader/execution/unary/f16_arithmetic.bin": "5fedbac9",
"webgpu/shader/execution/unary/f16_conversion.bin": "f05c848d",
"webgpu/shader/execution/unary/f32_arithmetic.bin": "1c0045cc",
"webgpu/shader/execution/unary/f32_conversion.bin": "afa1b58b",
"webgpu/shader/execution/unary/i32_arithmetic.bin": "a996bb97",
"webgpu/shader/execution/unary/i32_complement.bin": "8ba5f8f0",
"webgpu/shader/execution/unary/i32_conversion.bin": "9c7ae9cf",
"webgpu/shader/execution/unary/u32_complement.bin": "b76f5d95",
"webgpu/shader/execution/unary/u32_conversion.bin": "2aaa9ba5"
}
Binary file modified src/resources/cache/webgpu/shader/execution/acos.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/acosh.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/asin.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/atan.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/atanh.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/clamp.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/cos.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/cosh.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/degrees.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/distance.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/floor.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/fma.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/fract.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/frexp.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/log.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/log2.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/max.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/min.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/mix.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/pow.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/radians.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/sign.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/sin.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/sinh.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/smoothstep.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/sqrt.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/trunc.bin
Binary file not shown.
8 changes: 4 additions & 4 deletions src/unittests/maths.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import {
correctlyRoundedF32,
FlushMode,
frexp,
fullF16Range,
fullF32Range,
scalarF16Range,
scalarF32Range,
fullI32Range,
lerp,
linearRange,
Expand Down Expand Up @@ -1557,7 +1557,7 @@ g.test('fullF32Range')
const neg_sub = test.params.neg_sub;
const pos_sub = test.params.pos_sub;
const pos_norm = test.params.pos_norm;
const got = fullF32Range({ neg_norm, neg_sub, pos_sub, pos_norm });
const got = scalarF32Range({ neg_norm, neg_sub, pos_sub, pos_norm });
const expect = test.params.expect;

test.expect(
Expand Down Expand Up @@ -1598,7 +1598,7 @@ g.test('fullF16Range')
const neg_sub = test.params.neg_sub;
const pos_sub = test.params.pos_sub;
const pos_norm = test.params.pos_norm;
const got = fullF16Range({ neg_norm, neg_sub, pos_sub, pos_norm });
const got = scalarF16Range({ neg_norm, neg_sub, pos_sub, pos_norm });
const expect = test.params.expect;

test.expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { makeTestGroup } from '../../../../../common/framework/test_group.js';
import { GPUTest } from '../../../../gpu_test.js';
import { TypeAbstractFloat, TypeVec } from '../../../../util/conversion.js';
import { FP, FPVector } from '../../../../util/floating_point.js';
import { sparseF64Range, sparseVectorF64Range } from '../../../../util/math.js';
import { sparseScalarF64Range, sparseVectorF64Range } from '../../../../util/math.js';
import { makeCaseCache } from '../case_cache.js';
import { onlyConstInputSource, run } from '../expression.js';

Expand All @@ -25,8 +25,8 @@ export const g = makeTestGroup(GPUTest);
const scalar_cases = {
['scalar']: () => {
return FP.abstract.generateScalarPairToIntervalCases(
sparseF64Range(),
sparseF64Range(),
sparseScalarF64Range(),
sparseScalarF64Range(),
'finite',
FP.abstract.additionInterval
);
Expand All @@ -38,7 +38,7 @@ const vector_scalar_cases = ([2, 3, 4] as const)
[`vec${dim}_scalar`]: () => {
return FP.abstract.generateVectorScalarToVectorCases(
sparseVectorF64Range(dim),
sparseF64Range(),
sparseScalarF64Range(),
'finite',
additionVectorScalarInterval
);
Expand All @@ -50,7 +50,7 @@ const scalar_vector_cases = ([2, 3, 4] as const)
.map(dim => ({
[`scalar_vec${dim}`]: () => {
return FP.abstract.generateScalarVectorToVectorCases(
sparseF64Range(),
sparseScalarF64Range(),
sparseVectorF64Range(dim),
'finite',
additionScalarVectorInterval
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { makeTestGroup } from '../../../../../common/framework/test_group.js';
import { GPUTest } from '../../../../gpu_test.js';
import { TypeAbstractFloat, TypeVec } from '../../../../util/conversion.js';
import { FP, FPVector } from '../../../../util/floating_point.js';
import { sparseF64Range, sparseVectorF64Range } from '../../../../util/math.js';
import { sparseScalarF64Range, sparseVectorF64Range } from '../../../../util/math.js';
import { makeCaseCache } from '../case_cache.js';
import { onlyConstInputSource, run } from '../expression.js';

Expand All @@ -25,8 +25,8 @@ export const g = makeTestGroup(GPUTest);
const scalar_cases = {
['scalar']: () => {
return FP.abstract.generateScalarPairToIntervalCases(
sparseF64Range(),
sparseF64Range(),
sparseScalarF64Range(),
sparseScalarF64Range(),
'finite',
FP.abstract.divisionInterval
);
Expand All @@ -38,7 +38,7 @@ const vector_scalar_cases = ([2, 3, 4] as const)
[`vec${dim}_scalar`]: () => {
return FP.abstract.generateVectorScalarToVectorCases(
sparseVectorF64Range(dim),
sparseF64Range(),
sparseScalarF64Range(),
'finite',
divisionVectorScalarInterval
);
Expand All @@ -50,7 +50,7 @@ const scalar_vector_cases = ([2, 3, 4] as const)
.map(dim => ({
[`scalar_vec${dim}`]: () => {
return FP.abstract.generateScalarVectorToVectorCases(
sparseF64Range(),
sparseScalarF64Range(),
sparseVectorF64Range(dim),
'finite',
divisionScalarVectorInterval
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { makeTestGroup } from '../../../../../common/framework/test_group.js';
import { GPUTest } from '../../../../gpu_test.js';
import { TypeAbstractFloat, TypeVec } from '../../../../util/conversion.js';
import { FP, FPVector } from '../../../../util/floating_point.js';
import { sparseF64Range, sparseVectorF64Range } from '../../../../util/math.js';
import { sparseScalarF64Range, sparseVectorF64Range } from '../../../../util/math.js';
import { makeCaseCache } from '../case_cache.js';
import { onlyConstInputSource, run } from '../expression.js';

Expand All @@ -25,8 +25,8 @@ export const g = makeTestGroup(GPUTest);
const scalar_cases = {
['scalar']: () => {
return FP.abstract.generateScalarPairToIntervalCases(
sparseF64Range(),
sparseF64Range(),
sparseScalarF64Range(),
sparseScalarF64Range(),
'finite',
FP.abstract.multiplicationInterval
);
Expand All @@ -38,7 +38,7 @@ const vector_scalar_cases = ([2, 3, 4] as const)
[`vec${dim}_scalar`]: () => {
return FP.abstract.generateVectorScalarToVectorCases(
sparseVectorF64Range(dim),
sparseF64Range(),
sparseScalarF64Range(),
'finite',
multiplicationVectorScalarInterval
);
Expand All @@ -50,7 +50,7 @@ const scalar_vector_cases = ([2, 3, 4] as const)
.map(dim => ({
[`scalar_vec${dim}`]: () => {
return FP.abstract.generateScalarVectorToVectorCases(
sparseF64Range(),
sparseScalarF64Range(),
sparseVectorF64Range(dim),
'finite',
multiplicationScalarVectorInterval
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { makeTestGroup } from '../../../../../common/framework/test_group.js';
import { GPUTest } from '../../../../gpu_test.js';
import { TypeAbstractFloat, TypeVec } from '../../../../util/conversion.js';
import { FP, FPVector } from '../../../../util/floating_point.js';
import { sparseF64Range, sparseVectorF64Range } from '../../../../util/math.js';
import { sparseScalarF64Range, sparseVectorF64Range } from '../../../../util/math.js';
import { makeCaseCache } from '../case_cache.js';
import { onlyConstInputSource, run } from '../expression.js';

Expand All @@ -25,8 +25,8 @@ export const g = makeTestGroup(GPUTest);
const scalar_cases = {
['scalar']: () => {
return FP.abstract.generateScalarPairToIntervalCases(
sparseF64Range(),
sparseF64Range(),
sparseScalarF64Range(),
sparseScalarF64Range(),
'finite',
FP.abstract.remainderInterval
);
Expand All @@ -38,7 +38,7 @@ const vector_scalar_cases = ([2, 3, 4] as const)
[`vec${dim}_scalar`]: () => {
return FP.abstract.generateVectorScalarToVectorCases(
sparseVectorF64Range(dim),
sparseF64Range(),
sparseScalarF64Range(),
'finite',
remainderVectorScalarInterval
);
Expand All @@ -50,7 +50,7 @@ const scalar_vector_cases = ([2, 3, 4] as const)
.map(dim => ({
[`scalar_vec${dim}`]: () => {
return FP.abstract.generateScalarVectorToVectorCases(
sparseF64Range(),
sparseScalarF64Range(),
sparseVectorF64Range(dim),
'finite',
remainderScalarVectorInterval
Expand Down
Loading

0 comments on commit 35005a9

Please sign in to comment.