close
Skip to content

[Testing] Add CUDA tensor validation contract tests in qdp-python #1279

@viiccwen

Description

@viiccwen

What

Add focused tests for CUDA tensor validation behavior in qdp-python.

Current coverage exercises validation indirectly through feature tests, but the validation contract itself is still spread across multiple files and scenarios. This follow-up should add a clearer test layer for the Python-facing CUDA validation rules.

Why

Recent batch float32 CUDA angle binding work exposed how easy it is for test expectations to drift from actual validation behavior.

A dedicated validation-oriented test set would make it easier to catch regressions in:

  • supported and unsupported dtypes
  • contiguous vs non-contiguous tensors
  • empty tensors
  • engine/tensor device mismatch
  • unsupported encoding methods

This should reduce the chance of stale expectations surviving in downstream tests.

How

  • add focused qdp-python tests for CUDA validation behavior
  • cover dtype acceptance and rejection across supported encoding methods
  • cover non-contiguous, empty, wrong-device, and unsupported-method cases
  • keep the scope test-focused; avoid unrelated refactoring unless a small validation bug is uncovered

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