Skip to content

oneAPI: Backport an IGC byte destination alignment fix. - #15280

Merged
maleadt merged 1 commit into
masterfrom
tb/libigc-byte-dst-align
Oct 22, 2026
Merged

maleadt merged 1 commit into
masterfrom
tb/libigc-byte-dst-align

Conversation

@maleadt

@maleadt maleadt commented Oct 22, 2026

Copy link
Copy Markdown
Member

Rebuilds libigc 2.41.5 with a fix to vISA's HWConformity::fixDstAlignment. On Gen12LP (TGL, DG1, ADL), a byte destination can only start at byte 0 or 1 of a dword execution channel. The pass reads the destination's offset from tryToAlignOperand and accepts byte 1. But when the operand itself can't be aligned, tryToAlignOperand returns without aligning the root declare, so that offset is only relative to a declare RA may still place at byte 2. The char then ends up at byte 3, which the hardware doesn't write:

(W)     mov (1|M0)               r6.11<4>:b    r6.4<0;1,0>:d

In oneAPI.jl, this made sub-group shuffles of Tuple{Bool, Int8, Float16, UInt16} return 0 for the Int8. It showed up in KernelInterface's test suite with the device exception reporting of JuliaGPU/oneAPI.jl#731, but plain kernels hit it too. A 12-line OpenCL C reproducer is in intel/intel-graphics-compiler#456.

When the reported offset is byte 1 and the operand couldn't be aligned, the patch aligns the root declare to the execution type with tryToAlignOperandRootDcl. The same code is still on IGC master; an upstream PR will follow once this build is confirmed.

HWConformity accepted a byte destination at byte 1 of a dword channel without aligning its root declare, so RA could place it at byte 3, which Gen12LP doesn't write. This made sub-group shuffles of mixed-width tuples return 0 for an Int8 field in oneAPI.jl. Reported upstream as intel/intel-graphics-compiler#456.
@maleadt
maleadt enabled auto-merge (squash) October 22, 2026 15:16
@maleadt
maleadt merged commit 357176b into master Oct 22, 2026
6 checks passed
@maleadt
maleadt deleted the tb/libigc-byte-dst-align branch October 22, 2026 15:42
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.

3 participants