Skip to content

The 0.8 round on headroom: array views compare Level Zero's pointers by value - #518

Merged
berkgeveci merged 1 commit into
Kitware:mainfrom
berkgeveci:fix/round08-headroom
Dec 5, 2026
Merged

berkgeveci merged 1 commit into
Kitware:mainfrom
berkgeveci:fix/round08-headroom

Conversation

@berkgeveci

Copy link
Copy Markdown
Collaborator

The 0.8 round on headroom (Level Zero, Intel Max 1100) found one test bug and nothing in Tack.

test_array_views' _same_view compared each buffer attribute with == or is. Level Zero's buffers keep their device pointer as a ctypes.c_void_p, and ctypes pointers compare by identity, so two views of the same memory failed with equal addresses: test_many_views_at_once_are_the_views_one_at_a_time[level_zero-*], all five kinds, in the whole suite, debug mode, the 0xFF fill and the disk cache's passes. Only Level Zero keeps a c_void_p, so the CPU, Metal and CUDA rounds could not show it. Pointers are now compared by value.

The rest of headroom's round passed: the suite with MPI, 64-bit ids, debug mode, TACK_FILL_NEW=0xFF, the disk cache twice, every example on Level Zero, the docs, VTK master's device-array sharing (13/13), and the ports. #509's histogram on 20 CPU threads: 22-43x faster than the atomics, the same counts.

Checked here: test_array_views.py on the CPU, ruff. headroom ran the same change (55cdda69 there) through its steps.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GG7WYUWKreUuUnumV7zzqb

_same_view compared each buffer attribute with == or is. Level Zero's
_device_ptr is a ctypes.c_void_p, which compares by identity, so two views
of the same memory failed test_many_views_at_once_are_the_views_one_at_a_time
on level_zero (all five kinds) although their addresses were equal.
@berkgeveci
berkgeveci added this pull request to the merge queue Dec 5, 2026
Merged via the queue into Kitware:main with commit 6ae9ff8 Dec 5, 2026
29 checks passed
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