Skip to content

Disable IGC's LdStCombine on the LTS stack - #790

Open
maleadt wants to merge 1 commit into
mainfrom
tb/igc-ldstcombine
Open

maleadt wants to merge 1 commit into
mainfrom
tb/igc-ldstcombine

Conversation

@maleadt

@maleadt maleadt commented Dec 2, 2026

Copy link
Copy Markdown
Member

On the LTS stack (IGC 2.11.43), kernels that update a 2- or 4-byte aggregate (ComplexF16, Complex{Int8}, Complex{Int16}, ...) in a loop return wrong values for every work-item except the first of each group. It shows up on Julia 1.13, which leaves the accumulator unscalarized, and it is what keeps test:lts:1.13 red.

The bug is in IGC's LdStCombine pass. It packs the fields of such values into one 32-bit lane, and copies between packed values were emitted as if they weren't packed. That produces the self-move noted in #757. intel/intel-graphics-compiler@15614f2 fixed it, first released in IGC 2.26.0, so the rolling stack (IGC 2.41 through NEO_jll) is unaffected.

With ONEAPI_LTS set, oneAPI.jl now sets IGC_EnableLdStCombine=0 when it initializes, unless the variable is already set. The same setting goes into every module's build flags as -igc_opts. NEO's on-disk compiler cache keys on build flags but not on the environment, so without the flag it kept serving kernels that were miscompiled before the workaround applied. The workaround is documented with the other LTS workarounds in docs/src/lts.md.

Tested on an Arc A770 with older JLL stacks swapped in (NEO 25.31 + IGC 2.16, NEO 25.44 + IGC 2.22) on Julia 1.13:

This was not run on Aurora itself; the ALCF pipeline will show the LTS result.

Fixes #757.

The LTS IGC (2.11) miscompiles kernels that update a 2- or 4-byte
aggregate such as `ComplexF16` or `Complex{Int8}` in a loop, which Julia
1.13 no longer scalarizes: all but the first work-item of each group get
wrong results. LdStCombine packs the fields of such values into one
32-bit lane, and copies between those packed values were emitted as if
they weren't packed. IGC 2.26 fixed it (intel/intel-graphics-compiler@15614f2),
so the rolling stack is unaffected.

With `ONEAPI_LTS` set, turn the pass off unless the user has already set
`IGC_EnableLdStCombine`. The setting is also passed in every module's
build flags, because NEO's on-disk compiler cache keys on those but not
on the environment, and would keep serving kernels miscompiled before
the workaround applied.

Fixes #757.
@maleadt

maleadt commented Dec 2, 2026

Copy link
Copy Markdown
Member Author

@michel2323 FYI, the IGC fix is intel/intel-graphics-compiler@15614f2 ("Fix layout struct copy"), first in IGC 2.26.0; the 2.11 LTS branch doesn't have it as of v2.11.54. If you have a channel to Intel for the Aurora LTS stack, that's the commit to ask them to backport, after which this workaround can go.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://juliagpu.github.io/oneAPI.jl/previews/PR790/

This branch has not been deployed

No deployments
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.

Wrong results from kernels accumulating 2- and 4-byte aggregates on the Aurora LTS stack with Julia 1.13 (IGC 2.11.43)

1 participant