viiccwen opened a new issue, #1171:
URL: https://github.com/apache/mahout/issues/1171

   ### What
   
   `qdp-core/tests` has grown harder to maintain because GPU-oriented 
integration tests evolved with inconsistent conventions for:
   
   - CUDA/QDP engine initialization
   - host-to-device copy setup
   - DLPack tensor cleanup
   - DLPack shape assertions
   - test target naming
   
   As a result, the test suite accumulated repeated boilerplate and made it 
difficult to tell at a glance which integration tests are GPU-only.
   
   ### Proposed Improvement
   
   Refactor `qdp-core/tests` to standardize common GPU-test patterns and 
improve discoverability.
   
   This work includes:
   
   - introducing shared helpers for GPU test setup in 
`qdp/qdp-core/tests/common/mod.rs`
   - centralizing host-to-device copy helpers for `f64`, `f32`, and `usize`
   - centralizing DLPack cleanup and shape assertion helpers
   - updating GPU-oriented tests to use the shared helpers instead of 
open-coded setup
   - renaming GPU-only integration test files with a `gpu_` prefix for clarity
   - updating documentation to use the renamed test targets
   
   ### Why
   
   This refactor improves maintainability without changing test intent:
   
   - less duplicated test boilerplate
   - more consistent skip behavior in no-GPU environments
   - fewer opportunities for cleanup/assertion drift across files
   - clearer `cargo test --test ...` target naming for contributors and CI 
readers
   
   ### Scope
   
   Affected areas include:
   
   - `qdp/qdp-core/tests/common/mod.rs`
   - `qdp/qdp-core/tests/gpu_dlpack.rs`
   - `qdp/qdp-core/tests/gpu_api_workflow.rs`
   - `qdp/qdp-core/tests/gpu_iqp_encoding.rs`
   - `qdp/qdp-core/tests/gpu_memory_safety.rs`
   - `qdp/qdp-core/tests/gpu_norm_f32.rs`
   - `qdp/qdp-core/tests/gpu_ptr_encoding.rs`
   - `qdp/qdp-core/tests/gpu_validation.rs`
   - `docs/qdp/testing.md`
   - `qdp/docs/test/README.md`
   
   ### Environment
   
   - OS: Linux
   - Python version: N/A
   - Qumat version: current branch / local checkout
   
   


-- 
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]

Reply via email to