Skip to content

feat: Add batch float32 zero-copy angle encoding in qdp-core#1268

Open
viiccwen wants to merge 1 commit intoapache:mainfrom
viiccwen:feature/angle-f32-batch-core
Open

feat: Add batch float32 zero-copy angle encoding in qdp-core#1268
viiccwen wants to merge 1 commit intoapache:mainfrom
viiccwen:feature/angle-f32-batch-core

Conversation

@viiccwen
Copy link
Copy Markdown
Contributor

@viiccwen viiccwen commented Apr 13, 2026

Related Issues

Changes

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • Test
  • CI/CD pipeline
  • Other

  • add batched float32 CUDA kernel support for angle encoding
  • expose the new kernel through qdp-kernels FFI
  • implement host-side angle batch float32 encoding in qdp-core
  • add zero-copy batch float32 angle APIs for CUDA pointers, including stream-aware variants
  • align float32 GPU-pointer validation with the existing float64 angle batch behavior
  • add kernel and core tests for success paths and failure paths

Why

QDP already had angle float32 zero-copy support for single samples, but not for batched angle features. That made batched angle workloads inconsistent with the existing single-sample API and with the amplitude float32 batch implementation pattern.

This change closes that gap in the Rust/CUDA core only. Python bindings remain out of scope for a follow-up PR.

How

  • implement launch_angle_encode_batch_f32 in qdp-kernels/src/angle.cu
  • add the corresponding extern declaration and non-CUDA stub in qdp-kernels/src/lib.rs
  • extend AngleEncoder with host-side batch float32 encoding and batch GPU-pointer float32 encoding
  • add public QdpEngine entry points for angle batch float32 zero-copy on the default stream and explicit streams
  • validate sample shape and reject non-finite float32 GPU-resident batch inputs before launching the encoding kernel
  • add tests covering kernel correctness, host-side batch encoding, zero-copy batch encoding, stream interop, error handling, and Float64-engine conversion

Checklist

  • Added or updated unit tests for all changes
  • Added or updated documentation for all changes

@viiccwen viiccwen changed the title [Feature] Add batch float32 zero-copy angle encoding in qdp-core feat: Add batch float32 zero-copy angle encoding in qdp-core Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add batch float32 zero-copy angle encoding in qdp-core

1 participant