Skip to content

Conversation

@bratpiorka
Copy link
Contributor

Implemented zeContextEvictMemory functionality in the Level Zero memory provider. Replaced the TODO comment in ze_memory_provider_resident_device_change_helper with the actual evict call, and added the evict function pointer to the ze_ops_t structure with proper symbol loading and validation.

Added complete test infrastructure support for the evict functionality. Updated all Level Zero test mock files to include zeContextEvictMemory mock method, loopback implementation, and export definitions to enable proper testing of the evict feature.

Added new test case existingAllocationsShouldBeEvictedFromRemovedDevice to verify that existing memory allocations are properly evicted from devices when they are removed from the resident device list, complementing the existing test for adding devices.

@bratpiorka bratpiorka marked this pull request as ready for review October 13, 2025 08:09
@bratpiorka bratpiorka requested a review from a team as a code owner October 13, 2025 08:09
Copy link
Contributor

@lslusarczyk lslusarczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for implementing this so good and so quickly. All is OK. Just one comment with proposition how to improve the test.

@bratpiorka bratpiorka force-pushed the rrudnick_resident_evict branch from d9bcf46 to e82c6a7 Compare October 13, 2025 08:29
@bratpiorka bratpiorka merged commit 9869d0e into oneapi-src:main Oct 13, 2025
75 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.

3 participants