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

   ### Purpose of PR
   
   This PR implements GPU-accelerated L2 norm calculation for batches of 
float32 vectors, extending the single-vector implementation to support 
efficient batch processing. This is essential for encoding multiple samples 
simultaneously in quantum machine learning workflows.
   
   It's follow-up PR for #916 , pls review it at first.
   
   ## Changes
   
   ### CUDA Kernels (`qdp/qdp-kernels/src/amplitude.cu`)
   
   - Added `l2_norm_batch_kernel_f32()`, `launch_l2_norm_batch_f32()`
   
   ### Rust Bindings (`qdp/qdp-kernels/src/lib.rs`)
   
   - Added `launch_l2_norm_batch_f32` function.
   - Added dummy implementation for non-Linux platforms (returns error code 999)
   
   ### Tests (`qdp/qdp-kernels/tests/amplitude_encode.rs`)
   
   - Added `test_l2_norm_batch_kernel_f32()` test case
   - Test verifies correctness for each sample in the batch
   - Tests with multiple batch sizes (3 samples in test case)
   
   
   ### Related Issues or PRs
   closes #917 
   
   ### Changes Made
   <!-- Please mark one with an "x"   -->
   - [ ] Bug fix
   - [x] New feature
   - [ ] Refactoring
   - [ ] Documentation
   - [x] Test
   - [ ] CI/CD pipeline
   - [ ] Other
   
   ### Breaking Changes
   <!-- Does this PR introduce a breaking change? -->
   - [ ] Yes
   - [x] No
   
   ### Checklist
   <!-- Please mark each item with an "x" when complete -->
   <!-- If not all items are complete, please open this as a **Draft PR**.
   Once all requirements are met, mark as ready for review. -->
   
   - [ ] Added or updated unit tests for all changes
   - [ ] Added or updated documentation for all changes
   - [ ] Successfully built and ran all unit tests or manual tests locally
   - [ ] PR title follows "MAHOUT-XXX: Brief Description" format (if related to 
an issue)
   - [ ] Code follows ASF guidelines
   


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