diff --git a/src/resources/cache/hashes.json b/src/resources/cache/hashes.json index 1dfb7379313f..2602b6a27686 100644 --- a/src/resources/cache/hashes.json +++ b/src/resources/cache/hashes.json @@ -1,110 +1,110 @@ { - "webgpu/shader/execution/binary/af_addition.bin": "f79f0374", - "webgpu/shader/execution/binary/af_logical.bin": "9ab41597", - "webgpu/shader/execution/binary/af_division.bin": "770fc018", - "webgpu/shader/execution/binary/af_matrix_addition.bin": "a401d81a", - "webgpu/shader/execution/binary/af_matrix_subtraction.bin": "a9e51912", - "webgpu/shader/execution/binary/af_multiplication.bin": "8f7b5f84", - "webgpu/shader/execution/binary/af_remainder.bin": "133a1dd7", - "webgpu/shader/execution/binary/af_subtraction.bin": "9148f3ce", - "webgpu/shader/execution/binary/f16_addition.bin": "d58a9371", - "webgpu/shader/execution/binary/f16_logical.bin": "80f9e754", - "webgpu/shader/execution/binary/f16_division.bin": "5d2bf113", - "webgpu/shader/execution/binary/f16_matrix_addition.bin": "531954a6", - "webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "b871cd18", - "webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "3603d1db", - "webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "c97537aa", - "webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "273b76c6", - "webgpu/shader/execution/binary/f16_multiplication.bin": "d98cd937", - "webgpu/shader/execution/binary/f16_remainder.bin": "6e5227f4", - "webgpu/shader/execution/binary/f16_subtraction.bin": "d243bbad", - "webgpu/shader/execution/binary/f32_addition.bin": "c288aef6", - "webgpu/shader/execution/binary/f32_logical.bin": "47467130", - "webgpu/shader/execution/binary/f32_division.bin": "c9c76117", - "webgpu/shader/execution/binary/f32_matrix_addition.bin": "88eedbfa", - "webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "9f76f2ac", - "webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "1d667df9", - "webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "aa253cf1", - "webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "98a63b3a", - "webgpu/shader/execution/binary/f32_multiplication.bin": "dce8dd5b", - "webgpu/shader/execution/binary/f32_remainder.bin": "d3bdb9e3", - "webgpu/shader/execution/binary/f32_subtraction.bin": "8a48e67a", - "webgpu/shader/execution/binary/i32_arithmetic.bin": "d345f9c7", - "webgpu/shader/execution/binary/i32_comparison.bin": "6d4ae7e0", - "webgpu/shader/execution/binary/u32_arithmetic.bin": "163f8a38", - "webgpu/shader/execution/binary/u32_comparison.bin": "f6c1497b", - "webgpu/shader/execution/abs.bin": "e21a06df", - "webgpu/shader/execution/acos.bin": "2a92d3d5", - "webgpu/shader/execution/acosh.bin": "c2cc2e23", - "webgpu/shader/execution/asin.bin": "2027460e", - "webgpu/shader/execution/asinh.bin": "21bac67b", - "webgpu/shader/execution/atan.bin": "6422056c", - "webgpu/shader/execution/atan2.bin": "d8ade832", - "webgpu/shader/execution/atanh.bin": "de1dd54c", - "webgpu/shader/execution/bitcast.bin": "fdd0874", - "webgpu/shader/execution/ceil.bin": "6596b2e2", - "webgpu/shader/execution/clamp.bin": "9a92d1b7", - "webgpu/shader/execution/cos.bin": "647f5fda", - "webgpu/shader/execution/cosh.bin": "5f847611", - "webgpu/shader/execution/cross.bin": "117f2e0f", - "webgpu/shader/execution/degrees.bin": "cadaa756", - "webgpu/shader/execution/determinant.bin": "f2df9222", - "webgpu/shader/execution/distance.bin": "d6a161d1", - "webgpu/shader/execution/dot.bin": "c788d592", - "webgpu/shader/execution/exp.bin": "a76c67ca", - "webgpu/shader/execution/exp2.bin": "a5b443c5", - "webgpu/shader/execution/faceForward.bin": "75f1f377", - "webgpu/shader/execution/floor.bin": "8aea5f9c", - "webgpu/shader/execution/fma.bin": "8682909f", - "webgpu/shader/execution/fract.bin": "ff3283f0", - "webgpu/shader/execution/frexp.bin": "9639418e", - "webgpu/shader/execution/inverseSqrt.bin": "9de3fa15", - "webgpu/shader/execution/ldexp.bin": "43fde30e", - "webgpu/shader/execution/length.bin": "24b87c1a", - "webgpu/shader/execution/log.bin": "c8447a16", - "webgpu/shader/execution/log2.bin": "bcefcef6", - "webgpu/shader/execution/max.bin": "bbd522ab", - "webgpu/shader/execution/min.bin": "4687f034", - "webgpu/shader/execution/mix.bin": "e79fc2e8", - "webgpu/shader/execution/modf.bin": "feedecc3", - "webgpu/shader/execution/normalize.bin": "78e7c0", - "webgpu/shader/execution/pack2x16float.bin": "e472a927", - "webgpu/shader/execution/pow.bin": "38d0ff7", - "webgpu/shader/execution/quantizeToF16.bin": "5496ab3", - "webgpu/shader/execution/radians.bin": "db736290", - "webgpu/shader/execution/reflect.bin": "b08379ba", - "webgpu/shader/execution/refract.bin": "d360cf82", - "webgpu/shader/execution/round.bin": "3d2c318e", - "webgpu/shader/execution/saturate.bin": "33892d9c", - "webgpu/shader/execution/sign.bin": "8a54e6ec", - "webgpu/shader/execution/sin.bin": "f0cd3a32", - "webgpu/shader/execution/sinh.bin": "4d1b0134", - "webgpu/shader/execution/smoothstep.bin": "a3b004be", - "webgpu/shader/execution/sqrt.bin": "dd8a5970", - "webgpu/shader/execution/step.bin": "eec1579d", - "webgpu/shader/execution/tan.bin": "612d43b", - "webgpu/shader/execution/tanh.bin": "6f95242c", - "webgpu/shader/execution/transpose.bin": "b1a9a7f7", - "webgpu/shader/execution/trunc.bin": "cdf5939e", - "webgpu/shader/execution/unpack2x16float.bin": "b992957a", - "webgpu/shader/execution/unpack2x16snorm.bin": "394e0942", - "webgpu/shader/execution/unpack2x16unorm.bin": "78f0ef3c", - "webgpu/shader/execution/unpack4x8snorm.bin": "926f3f3e", - "webgpu/shader/execution/unpack4x8unorm.bin": "3640a996", - "webgpu/shader/execution/unary/af_arithmetic.bin": "bf05a1b1", - "webgpu/shader/execution/unary/af_assignment.bin": "d711e244", + "webgpu/shader/execution/binary/af_addition.bin": "f50d0054", + "webgpu/shader/execution/binary/af_logical.bin": "ef38f267", + "webgpu/shader/execution/binary/af_division.bin": "dabbb1d1", + "webgpu/shader/execution/binary/af_matrix_addition.bin": "8d41501a", + "webgpu/shader/execution/binary/af_matrix_subtraction.bin": "2b5eb822", + "webgpu/shader/execution/binary/af_multiplication.bin": "6fb45595", + "webgpu/shader/execution/binary/af_remainder.bin": "25e662b1", + "webgpu/shader/execution/binary/af_subtraction.bin": "37703233", + "webgpu/shader/execution/binary/f16_addition.bin": "a712df38", + "webgpu/shader/execution/binary/f16_logical.bin": "e4f7d8", + "webgpu/shader/execution/binary/f16_division.bin": "4793560a", + "webgpu/shader/execution/binary/f16_matrix_addition.bin": "a079337b", + "webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "65fe996", + "webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "3f97acdd", + "webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "1fc983d8", + "webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "7e97d699", + "webgpu/shader/execution/binary/f16_multiplication.bin": "c77e8821", + "webgpu/shader/execution/binary/f16_remainder.bin": "e57bdbd7", + "webgpu/shader/execution/binary/f16_subtraction.bin": "85420ccf", + "webgpu/shader/execution/binary/f32_addition.bin": "d2790380", + "webgpu/shader/execution/binary/f32_logical.bin": "d8a1e4a4", + "webgpu/shader/execution/binary/f32_division.bin": "a75642db", + "webgpu/shader/execution/binary/f32_matrix_addition.bin": "5b0b0511", + "webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "671efb98", + "webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "bea0478c", + "webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "e6fc9dfb", + "webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "b6b1b664", + "webgpu/shader/execution/binary/f32_multiplication.bin": "8c8cf117", + "webgpu/shader/execution/binary/f32_remainder.bin": "43e749be", + "webgpu/shader/execution/binary/f32_subtraction.bin": "50da2154", + "webgpu/shader/execution/binary/i32_arithmetic.bin": "ecb16a4f", + "webgpu/shader/execution/binary/i32_comparison.bin": "579cc94", + "webgpu/shader/execution/binary/u32_arithmetic.bin": "e08964b4", + "webgpu/shader/execution/binary/u32_comparison.bin": "8c8538e1", + "webgpu/shader/execution/abs.bin": "5c17e46c", + "webgpu/shader/execution/acos.bin": "120bfdf", + "webgpu/shader/execution/acosh.bin": "942cc2bb", + "webgpu/shader/execution/asin.bin": "fe636cf0", + "webgpu/shader/execution/asinh.bin": "61d55466", + "webgpu/shader/execution/atan.bin": "cac44506", + "webgpu/shader/execution/atan2.bin": "3403e5f", + "webgpu/shader/execution/atanh.bin": "6221541c", + "webgpu/shader/execution/bitcast.bin": "945e5c2a", + "webgpu/shader/execution/ceil.bin": "ad590261", + "webgpu/shader/execution/clamp.bin": "fb7095fa", + "webgpu/shader/execution/cos.bin": "f76f3cfc", + "webgpu/shader/execution/cosh.bin": "23274e7d", + "webgpu/shader/execution/cross.bin": "d81d20b", + "webgpu/shader/execution/degrees.bin": "ad65e311", + "webgpu/shader/execution/determinant.bin": "eb512a79", + "webgpu/shader/execution/distance.bin": "868585b7", + "webgpu/shader/execution/dot.bin": "db38aa67", + "webgpu/shader/execution/exp.bin": "62705ef9", + "webgpu/shader/execution/exp2.bin": "54d0df5e", + "webgpu/shader/execution/faceForward.bin": "f7e3a12b", + "webgpu/shader/execution/floor.bin": "6083291e", + "webgpu/shader/execution/fma.bin": "3cb81190", + "webgpu/shader/execution/fract.bin": "d000d278", + "webgpu/shader/execution/frexp.bin": "15d2eb99", + "webgpu/shader/execution/inverseSqrt.bin": "98598f6b", + "webgpu/shader/execution/ldexp.bin": "7cda090b", + "webgpu/shader/execution/length.bin": "a092226a", + "webgpu/shader/execution/log.bin": "4afb8069", + "webgpu/shader/execution/log2.bin": "5c10d479", + "webgpu/shader/execution/max.bin": "38cb6596", + "webgpu/shader/execution/min.bin": "715e13fc", + "webgpu/shader/execution/mix.bin": "67a69982", + "webgpu/shader/execution/modf.bin": "e9d534e0", + "webgpu/shader/execution/normalize.bin": "ec5df722", + "webgpu/shader/execution/pack2x16float.bin": "e4852967", + "webgpu/shader/execution/pow.bin": "8b43d36d", + "webgpu/shader/execution/quantizeToF16.bin": "34152620", + "webgpu/shader/execution/radians.bin": "9953e412", + "webgpu/shader/execution/reflect.bin": "59fae21b", + "webgpu/shader/execution/refract.bin": "79650096", + "webgpu/shader/execution/round.bin": "b4533213", + "webgpu/shader/execution/saturate.bin": "37ca84d0", + "webgpu/shader/execution/sign.bin": "c2e029fd", + "webgpu/shader/execution/sin.bin": "14319b5", + "webgpu/shader/execution/sinh.bin": "bfa704c1", + "webgpu/shader/execution/smoothstep.bin": "6370f69a", + "webgpu/shader/execution/sqrt.bin": "98926bdc", + "webgpu/shader/execution/step.bin": "7375ba92", + "webgpu/shader/execution/tan.bin": "9bc439ef", + "webgpu/shader/execution/tanh.bin": "a3a298d2", + "webgpu/shader/execution/transpose.bin": "e9f7ab2e", + "webgpu/shader/execution/trunc.bin": "49dfcdee", + "webgpu/shader/execution/unpack2x16float.bin": "d93977ea", + "webgpu/shader/execution/unpack2x16snorm.bin": "764c0f13", + "webgpu/shader/execution/unpack2x16unorm.bin": "cf870fc1", + "webgpu/shader/execution/unpack4x8snorm.bin": "3ed6a27e", + "webgpu/shader/execution/unpack4x8unorm.bin": "8df9108c", + "webgpu/shader/execution/unary/af_arithmetic.bin": "80129d46", + "webgpu/shader/execution/unary/af_assignment.bin": "966a724a", "webgpu/shader/execution/unary/bool_conversion.bin": "d0c1e5a3", - "webgpu/shader/execution/unary/f16_arithmetic.bin": "6095e89f", - "webgpu/shader/execution/unary/f16_conversion.bin": "76546200", - "webgpu/shader/execution/unary/f32_arithmetic.bin": "a16e7cf4", - "webgpu/shader/execution/unary/f32_conversion.bin": "62604b96", + "webgpu/shader/execution/unary/f16_arithmetic.bin": "408620de", + "webgpu/shader/execution/unary/f16_conversion.bin": "46c02cf1", + "webgpu/shader/execution/unary/f32_arithmetic.bin": "378a4095", + "webgpu/shader/execution/unary/f32_conversion.bin": "4743152f", "webgpu/shader/execution/unary/i32_arithmetic.bin": "a8649cbb", "webgpu/shader/execution/unary/i32_conversion.bin": "e5157a69", "webgpu/shader/execution/unary/u32_conversion.bin": "d07d0c20", "webgpu/shader/execution/unary/ai_assignment.bin": "f62c765c", - "webgpu/shader/execution/binary/ai_arithmetic.bin": "43501242", + "webgpu/shader/execution/binary/ai_arithmetic.bin": "a82361ec", "webgpu/shader/execution/unary/ai_arithmetic.bin": "8e448c53", - "webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin": "c57c159e", - "webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin": "d21017f3", - "webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin": "ddd2f83a" + "webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin": "d55eea17", + "webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin": "31afee59", + "webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin": "255e4937" } \ No newline at end of file diff --git a/src/resources/cache/webgpu/shader/execution/binary/af_matrix_addition.bin b/src/resources/cache/webgpu/shader/execution/binary/af_matrix_addition.bin index 634f518e0d12..ba9d123cbf41 100644 Binary files a/src/resources/cache/webgpu/shader/execution/binary/af_matrix_addition.bin and b/src/resources/cache/webgpu/shader/execution/binary/af_matrix_addition.bin differ diff --git a/src/resources/cache/webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin b/src/resources/cache/webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin index 5f8636b77c7d..b710ae908402 100644 Binary files a/src/resources/cache/webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin and b/src/resources/cache/webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin differ diff --git a/src/resources/cache/webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin b/src/resources/cache/webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin index a8d35f964d4e..c8a3b7205aaa 100644 Binary files a/src/resources/cache/webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin and b/src/resources/cache/webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin differ diff --git a/src/resources/cache/webgpu/shader/execution/binary/af_matrix_subtraction.bin b/src/resources/cache/webgpu/shader/execution/binary/af_matrix_subtraction.bin index 1754d77f1aad..8f88d196cebe 100644 Binary files a/src/resources/cache/webgpu/shader/execution/binary/af_matrix_subtraction.bin and b/src/resources/cache/webgpu/shader/execution/binary/af_matrix_subtraction.bin differ diff --git a/src/resources/cache/webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin b/src/resources/cache/webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin index 0a61c01c1a46..e57f91ffd980 100644 Binary files a/src/resources/cache/webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin and b/src/resources/cache/webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin differ diff --git a/src/webgpu/shader/execution/expression/binary/af_matrix_matrix_multiplication.cache.ts b/src/webgpu/shader/execution/expression/binary/af_matrix_matrix_multiplication.cache.ts index c7540083d6ff..e539ee1db5da 100644 --- a/src/webgpu/shader/execution/expression/binary/af_matrix_matrix_multiplication.cache.ts +++ b/src/webgpu/shader/execution/expression/binary/af_matrix_matrix_multiplication.cache.ts @@ -11,7 +11,7 @@ const mat_mat_cases = ([2, 3, 4] as const) [`mat${k}x${rows}_mat${cols}x${k}`]: () => { return selectNCases( 'binary/af_matrix_matrix_multiplication', - 50, + 10, FP.abstract.generateMatrixPairToMatrixCases( sparseMatrixF64Range(k, rows), sparseMatrixF64Range(cols, k), diff --git a/src/webgpu/shader/execution/expression/case.ts b/src/webgpu/shader/execution/expression/case.ts index 063b58da4267..d837b1c32fb4 100644 --- a/src/webgpu/shader/execution/expression/case.ts +++ b/src/webgpu/shader/execution/expression/case.ts @@ -69,7 +69,9 @@ export function selectNCases(dis: string, n: number, cases: Case[]): Case[] { return cases; } const dis_crc32 = crc32(dis); - return cases.filter(c => n * (0xffff_ffff / count) > (crc32(c.input.toString()) ^ dis_crc32)); + return cases.filter( + c => Math.trunc((n / count) * 0xffff_ffff) > (crc32(c.input.toString()) ^ dis_crc32) >>> 0 + ); } /**