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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
