NVIDIA / NVIDIA/cuda-quantum

[CI] [tensornet] Attempt to set target causes fatal error in some OS environments

Open
#1,925 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug stale-notified testing
Dominant language
C++
Stars
1.1k
Forks
456
Avg merge
1d 22h
Merged PRs (30d)
165

Description

  • The tensornet and tensornet simulators may not be available in the CI environment. A Python test which attempts to check the availability as shown below, causes the Validate wheel and Validate installer stages to crash.

(Added following in python/tests/kernel/test_sample_kernel.py)

@pytest.mark.parametrize("target", [
    'density-matrix-cpu', 'nvidia', 'nvidia-fp64', 'nvidia-mqpu',
    'nvidia-mqpu-fp64', 'qpp-cpu', 'tensornet', 'tensornet-mps'
])
def test_simulators(target):
    """Test simulation on all available simulation targets."""

    def can_set_target(name):
        target_installed = True
        try:
            cudaq.set_target(name)
        except RuntimeError:
            target_installed = False
        return target_installed

    if can_set_target(target):
        test_simple_sampling_qpe()
        cudaq.reset_target()
    else:
        pytest.skip("target not available")

    cudaq.reset_target()

Runs: locally in dev-image.
Validate wheel stage

  • runs successfully on Fedora (arm64 and amd64), Debian (amd64)
  • crashes on Ubuntu (amd64), RedHat (amd64), OpenSuse (amd64)

Validate installer stage

  • only works on Debian (amd64)
  • crashes on Ubuntu (arm64 and amd64), RedHat (arm64 and amd64), OpenSuse (amd64), Fedora (arm64 and amd64)

PR to showcase this behavior: https://github.com/NVIDIA/cuda-quantum/pull/1923/

CI: https://github.com/NVIDIA/cuda-quantum/actions/runs/9914417384?pr=1923

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with python/tests/kernel/test_sample_kernel.py and the Validate wheel and Validate installer CI stages. Reproduce the simulator availability check across the listed operating systems, then use the PR and CI run linked in the issue to compare the failing behavior with the successful Debian and Fedora runs. Done means unavailable targets no longer crash either validation stage.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.