Repository navigation
Test multiplication with overflow - #962
Conversation
Benchmark resultsCompared with ddab9e372, the latest measured ancestor of the merge base (1 commit before it). Times are the minimum time of every benchmark. A change is unusual when it exceeds both three times the benchmark's typical change between consecutive runs on the default branch and a minimum per category (performance 3%, latency 5%, applications 3%, other 3%). A benchmark that starts or stops allocating is listed however few the allocations. A single run can still be a fluke, so rerun before drawing conclusions.
All benchmarks
|
4ed8bfb to
69962cc
Compare
`Base.checked_mul`, and with it `Rational` arithmetic, failed to build on the PoCL back end, and SPIR-V back ends computed the overflow flag of signed products wrongly (#916). Compare products and overflow flags against the host for signed and unsigned 32 and 64-bit integers.
69962cc to
8566dd7
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## tb/device-throw #962 +/- ##
===================================================
+ Coverage 84.79% 84.82% +0.03%
===================================================
Files 31 31
Lines 2926 2926
===================================================
+ Hits 2481 2482 +1
+ Misses 445 444 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Fixes #916.
Base.checked_mul, and with itRationalarithmetic, failed to build on the PoCL back end, and the LLVM SPIR-V back end computed the overflow flag of signed products wrongly (-1 * 1overflowed,2^62 * 2didn't), which also affects oneAPI and OpenCL.jl. Both are fixed in the JLLs:These are new builds of versions KA already allows, so
[compat]can't require them; a fresh resolve picks them up. This adds a test comparing products and overflow flags against the host.On Julia 1.10,
Rationalarithmetic also needs the back end to overrideBase.__throw_rational_argerror_typemin, which builds its error message withstring. The CPU back end gets that override from GPUToolbox'sthrow_overrides(#966). Other back ends skip theRationalcheck on 1.10 until they adopt those overrides too (JuliaGPU/CUDA.jl#3568, JuliaGPU/AMDGPU.jl#1217, JuliaGPU/OpenCL.jl#604, JuliaGPU/oneAPI.jl#764, JuliaGPU/Metal.jl#1138); without them, Metal crashes in LLVM rather than reporting an error.OpenCL.jl's targets that go through OpenCL C (
poclc,nvidia) also need spirv2clc to translateOpSMulExtendedandOpUMulExtended(JuliaGPU/spirv2clc#29), so the OpenCL CI job will fail until the new spirv2clc_jll is registered.