UCT/ZE/TEST: expand ZE RMA coverage and fix ze_copy rkey_compare path - #11331
UCT/ZE/TEST: expand ZE RMA coverage and fix ze_copy rkey_compare path#11331yafshar wants to merge 27 commits into
Conversation
- Add UCT RMA tests for ze_copy covering put/get zcopy operations on ZE device and managed memory. - Enable runtime skip logic based on ZE memory type availability instead of compile-time gtest filtering. - Include ze_copy in p2p_rma source memory-type selection alongside cuda_ipc and rocm_copy. - Introduce UCT_INSTANTIATE_ZE_TEST_CASE macro in uct_test.h to standardize ZE test instantiation. - Update gtest Makefile.am to build ZE transport tests.
- Wire ze_copy component rkey_compare to uct_base_rkey_compare to prevent crashes in ze_copy/test_md.rkey_compare. - Validate ze_copy mem_dereg parameters (memh and invalidate flag) to match MD bad-argument behavior when parameter checking is enabled. - Fix the style
- Add ZE host, device, and managed memory RMA tests for ze_copy transport in test_ze.cc. - Extend MD tests to cover ZE mem_query behavior and add ZE dmabuf query tests in test_md.cc.
Run dmabuf mem_query tests via the generic MD fixture (test_md_dmabuf) instead of a ZE-only fixture, validating the generic dmabuf interface across MDs.
|
Clarification: this PR is not blocked on #11321, but without it the ZE md_buffer test path will be skipped due to missing ZE support in gtest mem_buffer/UCM hooks. |
|
Hi @yosefe, just a gentle follow‑up in case this slipped through. |
Keep ze_copy_md.c focused on functional changes by adding parameter validation to uct_ze_copy_mem_dereg() and wiring rkey_compare to uct_base_rkey_compare(). Refactor the ze_copy RMA tests by consolidating duplicated logic into memory-type-parameterized run_single() and run_range() helpers. Switch the tests to UCS_TEST_SKIP_COND_P() and rely on the common RMA transfer path, ensuring ZE-local buffers are exercised as both source and destination. Update the dmabuf query test to accept UCS_OK when queried with an invalid dmabuf file descriptor, matching the MD API contract. Also use ucs_get_page_size() to determine the query buffer size instead of a hard-coded value. Signed-off-by: Yaser Afshar <yaser.afshar@intel.com>
- Drop redundant GET_ZCOPY/PUT_ZCOPY checks in ze_caps_and_mem_types;
they are already guaranteed by UCS_TEST_SKIP_COND_P.
- Merge mem_query_dmabuf_offset into mem_query_dmabuf by looping over
offsets {0, 128}, preserving negative and error-path coverage.
Signed-off-by: Yaser Afshar <yaser.afshar@intel.com>
|
@tvegas1 can we merge this PR? |
brminich
left a comment
There was a problem hiding this comment.
pls update all affected files with Intel copyright
@brminich thanks — Intel copyright added to all files touched by this PR. Also resolved a conflict merging master. One update on my earlier note: now that #11321 is merged, gtest Ready to merge from my side. |
What?
This PR expands ZE test coverage in UCT gtests and fixes a ZE MD callback issue
that caused a crash in existing tests.
in ze_copy_md.c
Why?
ZE paths lacked sufficient automated coverage for ze_copy transport and MD
behavior, and an existing ZE MD test exposed a real failure: