Repository navigation
The 0.8 round on headroom: array views compare Level Zero's pointers by value - #518
Merged
Merged
Conversation
_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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 0.8 round on headroom (Level Zero, Intel Max 1100) found one test bug and nothing in Tack.
test_array_views'_same_viewcompared each buffer attribute with==oris. Level Zero's buffers keep their device pointer as actypes.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, the0xFFfill and the disk cache's passes. Only Level Zero keeps ac_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.pyon the CPU, ruff. headroom ran the same change (55cdda69there) through its steps.🤖 Generated with Claude Code
https://claude.ai/code/session_01GG7WYUWKreUuUnumV7zzqb