Skip to content

UCM/ZE/TEST: Add ZE support to gtest mem_buffer and UCM hook tests#11321

Open
yafshar wants to merge 4 commits into
openucx:masterfrom
intel-staging:test/ze-mem-buffer-ucm-hooks
Open

UCM/ZE/TEST: Add ZE support to gtest mem_buffer and UCM hook tests#11321
yafshar wants to merge 4 commits into
openucx:masterfrom
intel-staging:test/ze-mem-buffer-ucm-hooks

Conversation

@yafshar
Copy link
Copy Markdown
Contributor

@yafshar yafshar commented Apr 4, 2026

What?

Add Level Zero (ZE) memory support to gtest mem_buffer and introduce UCM ZE hook tests.

This PR:

  • Extends mem_buffer to support ZE host, device, and managed memory types
  • Adds ZE copy and memset handling paths to mem_buffer utilities
  • Introduces UCM ZE hook tests to validate memory alloc/free callback behavior
  • Updates gtest build rules to compile and link ZE tests and dependencies

Why?

UCX gtests already cover GPU memory handling and UCM hook behavior for other backends, but ZE memory flows were not covered in this area.

Adding ZE support and tests improves confidence that:

  • ZE memory operations are handled correctly by shared test utilities
  • UCM memory-type events are emitted as expected for ZE alloc/free APIs

How?

The change adds ZE-gated code paths under HAVE_ZE in gtest mem_buffer:

A new UCM ZE hooks gtest suite allocates and frees ZE host, device, and managed memory and verifies that matching UCM alloc/free events are generated.
Build integration is updated in gtest/Makefile.am to include the new ZE test sources and ZE compiler/linker flags when ZE support is enabled.

- Extend gtest mem_buffer with ZE host, device, and managed
  allocators, including ZE copy and memset paths, and centralize
  ZE runtime initialization.
- Add UCM ZE hook tests to validate alloc and free callbacks.
- Update gtest Makefile.am to include ZE sources and linker flags.
@yafshar yafshar marked this pull request as ready for review April 4, 2026 14:57
@yafshar
Copy link
Copy Markdown
Contributor Author

yafshar commented Apr 23, 2026

Hi @yosefe, just pinging for visibility. It’s been open for a few weeks and I wanted to check if you had a chance to look, or if there’s anything I can do to help move it forward.

@yafshar
Copy link
Copy Markdown
Contributor Author

yafshar commented May 8, 2026

Hi @yosefe, just a gentle follow‑up in case this slipped through.
Happy to address any questions or make changes if needed.
Thanks!

@yafshar yafshar force-pushed the test/ze-mem-buffer-ucm-hooks branch from 01288fb to 072a8d0 Compare May 12, 2026 18:46
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