Skip to content

[Testing] Add DLPack regression tests for CUDA batch angle encoding in qdp-python #1280

@viiccwen

Description

@viiccwen

What

Add regression tests for DLPack and zero-copy interoperability on CUDA batch angle encoding paths in qdp-python.

Recent work added batch float32 CUDA angle encoding support in the Python bindings. This follow-up should strengthen regression coverage around the Python <-> PyTorch handoff for that path.

Why

One of the main reasons to use the CUDA tensor path is zero-copy integration through DLPack.

The current feature tests cover correctness and validation behavior, but they do not fully protect interoperability expectations such as:

  • compatibility with torch.from_dlpack(...)
  • output device placement
  • output dtype following engine precision
  • output shape for batched inputs

A dedicated regression layer here would make the zero-copy workflow safer to evolve.

How

  • add qdp-python tests that consume CUDA batch angle outputs through torch.from_dlpack(...)
  • assert expected device, dtype, and shape
  • include at least one deterministic batch case for state-value sanity checks
  • keep the scope limited to DLPack / interop regression coverage

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions