You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by "viiccwen (via GitHub)" <gi...@apache.org> on 2026/03/11 05:15:13 UTC

[PR] refactor: standardize qdp-core GPU integration tests [mahout]

viiccwen opened a new pull request, #1172:
URL: https://github.com/apache/mahout/pull/1172

   ### Related Issues
   
   closes #1170, and #1144 will be follow-up PR.
   
   ### Changes
   
   - [ ] Bug fix
   - [ ] New feature
   - [x] Refactoring
   - [x] Documentation
   - [x] Test
   - [ ] CI/CD pipeline
   - [ ] Other
   
   ### Why
   
   The `qdp-core` integration tests had drifted into a mix of different patterns for GPU initialization, host-to-device copy setup, DLPack cleanup, and DLPack shape assertions. GPU-only test targets were also not consistently named, which made the suite harder to navigate and document.
   
   I didn't change any business logic, just refactoring it. : )
   
   ### How
   
   Refactored `qdp/qdp-core/tests/common/mod.rs` to provide shared helpers for:
   
   - CUDA device acquisition
   - QDP engine acquisition
   - precision-specific engine acquisition
   - host-to-device copies for `f64`, `f32`, and `usize`
   - DLPack 2D shape assertions
   - DLPack deleter-based cleanup
   
   Updated GPU-oriented integration tests to use the shared helpers instead of open-coded setup and cleanup:
   
   - `gpu_dlpack.rs`
   - `gpu_api_workflow.rs`
   - `gpu_iqp_encoding.rs`
   - `gpu_memory_safety.rs`
   - `gpu_norm_f32.rs`
   - `gpu_ptr_encoding.rs`
   - `gpu_validation.rs`
   
   Renamed GPU-only integration test files to use a `gpu_` prefix:
   
   - `api_workflow.rs` -> `gpu_api_workflow.rs`
   - `dlpack.rs` -> `gpu_dlpack.rs`
   - `iqp_encoding.rs` -> `gpu_iqp_encoding.rs`
   - `memory_safety.rs` -> `gpu_memory_safety.rs`
   - `validation.rs` -> `gpu_validation.rs`
   
   Updated test documentation to reference the renamed targets:
   
   - `docs/qdp/testing.md`
   - `qdp/docs/test/README.md`
   
   All targeted test binaries passed successfully.
   
   ## Checklist
   
   - [x] Added or updated unit tests for all changes
   - [x] Added or updated documentation for all changes
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mahout.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor: standardize qdp-core GPU integration tests [mahout]

Posted by "ryankert01 (via GitHub)" <gi...@apache.org>.
ryankert01 merged PR #1172:
URL: https://github.com/apache/mahout/pull/1172


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mahout.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor: standardize qdp-core GPU integration tests [mahout]

Posted by "viiccwen (via GitHub)" <gi...@apache.org>.
viiccwen commented on PR #1172:
URL: https://github.com/apache/mahout/pull/1172#issuecomment-4044079844

   > We can add to no gpu test in makefile(if truely not gpu needed) https://github.com/apache/mahout/blob/main/Makefile#L33
   
   Nice idea, I'll open follow-up PR. 🙌


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mahout.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor: standardize qdp-core GPU integration tests [mahout]

Posted by "ryankert01 (via GitHub)" <gi...@apache.org>.
ryankert01 commented on PR #1172:
URL: https://github.com/apache/mahout/pull/1172#issuecomment-4038507279

   We can add to no gpu test in makefile(if truely not gpu needed)
   https://github.com/apache/mahout/blob/main/Makefile#L33


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mahout.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org