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

   ### Related Issues
   
   closes #1169 
   
   ### Changes
   
   - [x] Bug fix
   - [ ] New feature
   - [ ] Refactoring
   - [ ] Documentation
   - [x] Test
   - [ ] CI/CD pipeline
   - [ ] Other
   
   ### Why
   
   Several GPU-dependent DLPack tests in `qdp-core` used 
`CudaDevice::new(0).unwrap()`. In environments without a usable CUDA device, 
those tests panicked instead of skipping, which was inconsistent with the rest 
of the GPU test suite.
   
   ### How
   
   Updated the following tests in `qdp/qdp-core/tests/dlpack.rs` to return 
early when `CudaDevice::new(0)` fails:
   
   - `test_dlpack_batch_shape`
   - `test_dlpack_single_shape`
   - `test_dlpack_single_shape_f32`
   - `test_dlpack_batch_shape_f32`
   - `test_synchronize_stream_legacy`
   
   This aligns DLPack test behavior with other GPU-dependent tests in the 
repository that already treat missing CUDA devices as a skip condition.
   
   ## Verification
   
   Ran:
   
   ```bash
   cargo test -p qdp-core --test dlpack --manifest-path qdp/Cargo.toml
   ```
   
   Result:
   
   ```text
   test result: ok. 9 passed; 0 failed
   ```
   
   ## Checklist
   
   - [x] Added or updated unit tests for all changes
   - [ ] 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]

Reply via email to