Skip to content

[SYCL][HIP] Fix GlobalOffset bad-signature crash and re-enable Assert tests#22677

Open
zjin-lcf wants to merge 3 commits into
intel:syclfrom
zjin-lcf:sycl-hip-fix-assert-globaloffset
Open

[SYCL][HIP] Fix GlobalOffset bad-signature crash and re-enable Assert tests#22677
zjin-lcf wants to merge 3 commits into
intel:syclfrom
zjin-lcf:sycl-hip-fix-assert-globaloffset

Conversation

@zjin-lcf

Copy link
Copy Markdown
Contributor

Summary

  • Fix a crash in GlobalOffsetPass caused by rebuilding implicit-offset calls with an incorrect call signature, which crashed Assert tests on HIP.
  • Re-enable Assert/check_resource_leak and DeprecatedFeatures/DiscardEvents/discard_events_using_assert on HIP.

Test plan

  • Assert/assert_in_* pass on gfx942
  • Assert/check_resource_leak passes on gfx942
  • DiscardEvents/discard_events_using_assert passes on gfx942

Relates to #22300

zjin-lcf and others added 3 commits July 19, 2026 10:51
The GlobalOffsetPass crashed with "Calling a function with a bad
signature!" when rewriting callers of functions that gained an implicit
global-offset parameter, because non-call uses were handled with an early
return and new call instructions were built from the callee's updated type
instead of the original call's signature.

Iterate over all uses (skipping non-direct-call uses) and construct the new
call from the original call's function type with the implicit offset
parameter appended. This unblocks assert-in-kernel support on AMD HIP.

Re-enables the previously UNSUPPORTED Assert/* e2e tests on HIP.

Co-authored-by: Cursor <cursoragent@cursor.com>
This test passes on HIP (gfx942) with the current toolchain, so remove the
UNSUPPORTED: hip marker tracked by intel#22300.

Co-authored-by: Cursor <cursoragent@cursor.com>
This test was marked UNSUPPORTED on HIP only because device-side assert
did not work. assert now works on the HIP backend (GlobalOffset
bad-signature crash fix), so remove the stale marker (issue 22300). The
test remains UNSUPPORTED on CUDA per the existing fallback-libdevice
FIXME.

Co-authored-by: Cursor <cursoragent@cursor.com>
@zjin-lcf
zjin-lcf requested review from a team as code owners July 19, 2026 21:50
@zjin-lcf
zjin-lcf requested a review from cperkinsintel July 19, 2026 21:50
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.

2 participants