Skip to content

Commit

Permalink
wgsl: Convert all AbstractFloat tests with non-simple errors to using…
Browse files Browse the repository at this point in the history
… f32 intervals (#3493)

A number of existing tests for AF expressions were incorrectly implemented via performing the accuracy calculations as f64. These need to be converted to using the f32 interval calculations, because absolute, ULP, and inherited AF errors should be as accurate as f32.

This changes additition, cross, determinant, degrees, division, dot, fma, mix, radians, remainder, and various forms of matrix multiplication.

See https://www.w3.org/TR/WGSL/#abstract-float-accuracy for details on why this change is needed.
  • Loading branch information
zoddicus authored Mar 14, 2024
1 parent f1aa942 commit 3a56acd
Show file tree
Hide file tree
Showing 25 changed files with 197 additions and 285 deletions.
186 changes: 93 additions & 93 deletions src/resources/cache/hashes.json
Original file line number Diff line number Diff line change
@@ -1,110 +1,110 @@
{
"webgpu/shader/execution/binary/af_addition.bin": "24160909",
"webgpu/shader/execution/binary/af_addition.bin": "2607cb36",
"webgpu/shader/execution/binary/af_logical.bin": "ffb5a83f",
"webgpu/shader/execution/binary/af_division.bin": "c230ac78",
"webgpu/shader/execution/binary/af_matrix_addition.bin": "9079a042",
"webgpu/shader/execution/binary/af_matrix_subtraction.bin": "6b55102f",
"webgpu/shader/execution/binary/af_multiplication.bin": "4fc3b0d6",
"webgpu/shader/execution/binary/af_remainder.bin": "366caec6",
"webgpu/shader/execution/binary/af_subtraction.bin": "49a16db4",
"webgpu/shader/execution/binary/f16_addition.bin": "3fb1ee09",
"webgpu/shader/execution/binary/af_division.bin": "9642be53",
"webgpu/shader/execution/binary/af_matrix_addition.bin": "28783339",
"webgpu/shader/execution/binary/af_matrix_subtraction.bin": "fd58a70a",
"webgpu/shader/execution/binary/af_multiplication.bin": "48fb6954",
"webgpu/shader/execution/binary/af_remainder.bin": "31290507",
"webgpu/shader/execution/binary/af_subtraction.bin": "aa7a977f",
"webgpu/shader/execution/binary/f16_addition.bin": "8dee9967",
"webgpu/shader/execution/binary/f16_logical.bin": "65cdc6f",
"webgpu/shader/execution/binary/f16_division.bin": "1b5bd44a",
"webgpu/shader/execution/binary/f16_matrix_addition.bin": "fdea291a",
"webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "e727482e",
"webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "24d70bdd",
"webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "7acd3c3b",
"webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "9e01e0cf",
"webgpu/shader/execution/binary/f16_multiplication.bin": "c24b705c",
"webgpu/shader/execution/binary/f16_remainder.bin": "2764c7e1",
"webgpu/shader/execution/binary/f16_subtraction.bin": "d4014a38",
"webgpu/shader/execution/binary/f32_addition.bin": "b6707259",
"webgpu/shader/execution/binary/f16_division.bin": "7642d7e5",
"webgpu/shader/execution/binary/f16_matrix_addition.bin": "451a2ca2",
"webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "1a730f23",
"webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "4e59085f",
"webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "831ef7d9",
"webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "9956e198",
"webgpu/shader/execution/binary/f16_multiplication.bin": "f0593e54",
"webgpu/shader/execution/binary/f16_remainder.bin": "390d16d7",
"webgpu/shader/execution/binary/f16_subtraction.bin": "89d5e800",
"webgpu/shader/execution/binary/f32_addition.bin": "204ae10f",
"webgpu/shader/execution/binary/f32_logical.bin": "d40c1c0",
"webgpu/shader/execution/binary/f32_division.bin": "e19e30a6",
"webgpu/shader/execution/binary/f32_matrix_addition.bin": "6a13d6d6",
"webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "4c5cb0a2",
"webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "6b00d17f",
"webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "319d3ae1",
"webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "1c4893ca",
"webgpu/shader/execution/binary/f32_multiplication.bin": "f7dbbc8",
"webgpu/shader/execution/binary/f32_remainder.bin": "fb5dd3fe",
"webgpu/shader/execution/binary/f32_subtraction.bin": "aeaca568",
"webgpu/shader/execution/binary/f32_division.bin": "38119537",
"webgpu/shader/execution/binary/f32_matrix_addition.bin": "ee4f7b76",
"webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "1145eefd",
"webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "9b0de895",
"webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "a1caf103",
"webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "63b9f583",
"webgpu/shader/execution/binary/f32_multiplication.bin": "8c039186",
"webgpu/shader/execution/binary/f32_remainder.bin": "7d54ad97",
"webgpu/shader/execution/binary/f32_subtraction.bin": "9080f361",
"webgpu/shader/execution/binary/i32_arithmetic.bin": "90a3514a",
"webgpu/shader/execution/binary/i32_comparison.bin": "840b09e6",
"webgpu/shader/execution/binary/u32_arithmetic.bin": "e3f04e97",
"webgpu/shader/execution/binary/u32_comparison.bin": "dc1398d3",
"webgpu/shader/execution/abs.bin": "2b663377",
"webgpu/shader/execution/acos.bin": "a888c67f",
"webgpu/shader/execution/acosh.bin": "5383658b",
"webgpu/shader/execution/asin.bin": "a580a322",
"webgpu/shader/execution/asinh.bin": "31388535",
"webgpu/shader/execution/atan.bin": "c6f4c771",
"webgpu/shader/execution/atan2.bin": "3b9a37a1",
"webgpu/shader/execution/atanh.bin": "7295a313",
"webgpu/shader/execution/bitcast.bin": "73e0bea6",
"webgpu/shader/execution/ceil.bin": "24bd6be9",
"webgpu/shader/execution/clamp.bin": "8ed55492",
"webgpu/shader/execution/cos.bin": "4d36fa0",
"webgpu/shader/execution/cosh.bin": "a7da3a3",
"webgpu/shader/execution/cross.bin": "6ce2660b",
"webgpu/shader/execution/degrees.bin": "53a0849",
"webgpu/shader/execution/determinant.bin": "873e78af",
"webgpu/shader/execution/distance.bin": "bfce09a0",
"webgpu/shader/execution/dot.bin": "566b6e55",
"webgpu/shader/execution/exp.bin": "d8142d49",
"webgpu/shader/execution/exp2.bin": "52a403d1",
"webgpu/shader/execution/faceForward.bin": "f90dacbe",
"webgpu/shader/execution/floor.bin": "c7465b11",
"webgpu/shader/execution/fma.bin": "db3497d4",
"webgpu/shader/execution/fract.bin": "e65c5bd1",
"webgpu/shader/execution/frexp.bin": "5ce112f4",
"webgpu/shader/execution/inverseSqrt.bin": "84ea0a57",
"webgpu/shader/execution/ldexp.bin": "9d11f120",
"webgpu/shader/execution/length.bin": "dd759736",
"webgpu/shader/execution/log.bin": "5f77a59d",
"webgpu/shader/execution/log2.bin": "57fff45e",
"webgpu/shader/execution/max.bin": "c7cdd54f",
"webgpu/shader/execution/min.bin": "422be325",
"webgpu/shader/execution/mix.bin": "957e7d92",
"webgpu/shader/execution/modf.bin": "946d1f4f",
"webgpu/shader/execution/normalize.bin": "2ac02e80",
"webgpu/shader/execution/abs.bin": "cbc5bb84",
"webgpu/shader/execution/acos.bin": "99826c48",
"webgpu/shader/execution/acosh.bin": "86faac44",
"webgpu/shader/execution/asin.bin": "1aa47c31",
"webgpu/shader/execution/asinh.bin": "3ca77d23",
"webgpu/shader/execution/atan.bin": "f3b4fad4",
"webgpu/shader/execution/atan2.bin": "695628c1",
"webgpu/shader/execution/atanh.bin": "ccac869a",
"webgpu/shader/execution/bitcast.bin": "a46c0f3c",
"webgpu/shader/execution/ceil.bin": "15ea076",
"webgpu/shader/execution/clamp.bin": "16a6107",
"webgpu/shader/execution/cos.bin": "8608aa24",
"webgpu/shader/execution/cosh.bin": "406887b3",
"webgpu/shader/execution/cross.bin": "ef98a37f",
"webgpu/shader/execution/degrees.bin": "a1f81fe8",
"webgpu/shader/execution/determinant.bin": "925aced0",
"webgpu/shader/execution/distance.bin": "1d1daa4b",
"webgpu/shader/execution/dot.bin": "5e618a78",
"webgpu/shader/execution/exp.bin": "c9ff3ee4",
"webgpu/shader/execution/exp2.bin": "124dd7fa",
"webgpu/shader/execution/faceForward.bin": "766871a0",
"webgpu/shader/execution/floor.bin": "bdbcec65",
"webgpu/shader/execution/fma.bin": "df9710d4",
"webgpu/shader/execution/fract.bin": "c6ac37ac",
"webgpu/shader/execution/frexp.bin": "4e41a6ad",
"webgpu/shader/execution/inverseSqrt.bin": "a874b8e0",
"webgpu/shader/execution/ldexp.bin": "52e686eb",
"webgpu/shader/execution/length.bin": "864e5694",
"webgpu/shader/execution/log.bin": "d86b6b5e",
"webgpu/shader/execution/log2.bin": "bb5ba2bc",
"webgpu/shader/execution/max.bin": "3e73f492",
"webgpu/shader/execution/min.bin": "6cc26be0",
"webgpu/shader/execution/mix.bin": "aca1fe65",
"webgpu/shader/execution/modf.bin": "e8dc88c2",
"webgpu/shader/execution/normalize.bin": "bd40a69",
"webgpu/shader/execution/pack2x16float.bin": "d7ef3cf5",
"webgpu/shader/execution/pow.bin": "cd492166",
"webgpu/shader/execution/quantizeToF16.bin": "58bac06c",
"webgpu/shader/execution/radians.bin": "6ac08f50",
"webgpu/shader/execution/reflect.bin": "3c260554",
"webgpu/shader/execution/refract.bin": "7e952d7c",
"webgpu/shader/execution/round.bin": "f6b9bda1",
"webgpu/shader/execution/saturate.bin": "1c22f301",
"webgpu/shader/execution/sign.bin": "3ce55105",
"webgpu/shader/execution/sin.bin": "d48e7f2a",
"webgpu/shader/execution/sinh.bin": "f227c1d1",
"webgpu/shader/execution/smoothstep.bin": "6bdb4309",
"webgpu/shader/execution/sqrt.bin": "cd576d27",
"webgpu/shader/execution/step.bin": "dd584686",
"webgpu/shader/execution/tan.bin": "5ae50f61",
"webgpu/shader/execution/tanh.bin": "fe7a619d",
"webgpu/shader/execution/transpose.bin": "469edd7e",
"webgpu/shader/execution/trunc.bin": "8d3a05de",
"webgpu/shader/execution/unpack2x16float.bin": "e897c5ac",
"webgpu/shader/execution/unpack2x16snorm.bin": "450d5402",
"webgpu/shader/execution/unpack2x16unorm.bin": "306b3bf9",
"webgpu/shader/execution/unpack4x8snorm.bin": "fc1bd4c3",
"webgpu/shader/execution/unpack4x8unorm.bin": "763288cc",
"webgpu/shader/execution/unary/af_arithmetic.bin": "a39d4121",
"webgpu/shader/execution/unary/af_assignment.bin": "6ed540e8",
"webgpu/shader/execution/pow.bin": "a3f1d7bc",
"webgpu/shader/execution/quantizeToF16.bin": "cc9b060d",
"webgpu/shader/execution/radians.bin": "a4a45624",
"webgpu/shader/execution/reflect.bin": "f0edf7b6",
"webgpu/shader/execution/refract.bin": "b45fa1e3",
"webgpu/shader/execution/round.bin": "98a6ca02",
"webgpu/shader/execution/saturate.bin": "1724df20",
"webgpu/shader/execution/sign.bin": "c9304bbc",
"webgpu/shader/execution/sin.bin": "101ac9b0",
"webgpu/shader/execution/sinh.bin": "339cfa9d",
"webgpu/shader/execution/smoothstep.bin": "bd0ee34b",
"webgpu/shader/execution/sqrt.bin": "33a74294",
"webgpu/shader/execution/step.bin": "a546d1c7",
"webgpu/shader/execution/tan.bin": "98495e6c",
"webgpu/shader/execution/tanh.bin": "c8abf523",
"webgpu/shader/execution/transpose.bin": "48b9967b",
"webgpu/shader/execution/trunc.bin": "111d452f",
"webgpu/shader/execution/unpack2x16float.bin": "cafe4182",
"webgpu/shader/execution/unpack2x16snorm.bin": "9025c24a",
"webgpu/shader/execution/unpack2x16unorm.bin": "edec162d",
"webgpu/shader/execution/unpack4x8snorm.bin": "89fc1230",
"webgpu/shader/execution/unpack4x8unorm.bin": "6016b1d8",
"webgpu/shader/execution/unary/af_arithmetic.bin": "9f02dd09",
"webgpu/shader/execution/unary/af_assignment.bin": "2a53eabc",
"webgpu/shader/execution/unary/bool_conversion.bin": "f37ea003",
"webgpu/shader/execution/unary/f16_arithmetic.bin": "9cadc739",
"webgpu/shader/execution/unary/f16_conversion.bin": "49c7b38e",
"webgpu/shader/execution/unary/f32_arithmetic.bin": "28da577a",
"webgpu/shader/execution/unary/f32_conversion.bin": "fcdfdd08",
"webgpu/shader/execution/unary/f16_arithmetic.bin": "5596e63b",
"webgpu/shader/execution/unary/f16_conversion.bin": "ae15a286",
"webgpu/shader/execution/unary/f32_arithmetic.bin": "1b8dfc4a",
"webgpu/shader/execution/unary/f32_conversion.bin": "3d408f29",
"webgpu/shader/execution/unary/i32_arithmetic.bin": "25cf27d1",
"webgpu/shader/execution/unary/i32_conversion.bin": "276dcf69",
"webgpu/shader/execution/unary/u32_conversion.bin": "acac2172",
"webgpu/shader/execution/unary/ai_assignment.bin": "c876d431",
"webgpu/shader/execution/binary/ai_arithmetic.bin": "36a1d65b",
"webgpu/shader/execution/unary/ai_arithmetic.bin": "89e34dcf",
"webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin": "3fd8797b",
"webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin": "bf99158a",
"webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin": "8bcc7c30"
"webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin": "c6bc506b",
"webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin": "a77a12e3",
"webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin": "fb71513a"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/cross.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/determinant.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/dot.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/mix.bin
Binary file not shown.
Binary file modified src/resources/cache/webgpu/shader/execution/radians.bin
Binary file not shown.
Loading

0 comments on commit 3a56acd

Please sign in to comment.