Skip to content

Test checked rational multiplication on Intel's CPU runtime - #620

Merged
maleadt merged 1 commit into
mainfrom
tb/checked-mul
Nov 19, 2026
Merged

maleadt merged 1 commit into
mainfrom
tb/checked-mul

Conversation

@maleadt

@maleadt maleadt commented Nov 18, 2026

Copy link
Copy Markdown
Member

The rational arithmetic test added in #604 multiplies Ints with overflow checks, which the SPIR-V back-ends compile to OpSMulExtended. Upstream PoCL (the pocl_local job, built against a stock translator) and Intel's CPU runtime don't implement it (Cannot find symbol _Z20__spirv_SMulExtendedll). The Khronos translator rejects llvm.smul.with.overflow altogether.

JuliaGPU/GPUCompiler.jl#1104 lowers these intrinsics using OpenCL's mul_hi instead. This PR requires that release and drops the Intel skip.

Locally, with the GPUCompiler branch, pocl/intrinsics and poclc/intrinsics pass on pocl_jll and on upstream PoCL HEAD (d6614dcc6, built like pocl_local). The whole suite on upstream PoCL HEAD shows no other failures. intel/intrinsics passes on Intel's CPU runtime. Without the GPUCompiler change, the test fails on both upstream PoCL and Intel's CPU runtime.

The khronos job also needs the translator to handle llvm.ssub.with.overflow (from checked_neg/checked_sub on Rational), which is KhronosGroup/SPIRV-LLVM-Translator#4091, being backported in Yggdrasil.

Needs a GPUCompiler release containing #1104 (the compat says 2.23.2).

GPUCompiler 2.23.2 lowers `llvm.smul.with.overflow` using OpenCL's
`mul_hi` instead of OpSMulExtended, which Intel's CPU runtime and upstream
PoCL don't implement. That fixes the `rational arithmetic` test on both
(the latter is the `pocl_local` job), so it no longer needs skipping.
@codecov

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.40%. Comparing base (7e8c991) to head (515c5e7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #620      +/-   ##
==========================================
- Coverage   91.10%   90.40%   -0.70%     
==========================================
  Files          18       18              
  Lines        1810     1751      -59     
==========================================
- Hits         1649     1583      -66     
- Misses        161      168       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maleadt
maleadt merged commit ffd198d into main Nov 19, 2026
15 checks passed
@maleadt
maleadt deleted the tb/checked-mul branch November 19, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant