cuda-quantum icon indicating copy to clipboard operation
cuda-quantum copied to clipboard

Failing tests when building against libc++

Open bettinaheim opened this issue 9 months ago • 5 comments

Required prerequisites

  • [X] Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
  • [X] Make sure you've read the documentation. Your issue may be addressed there.
  • [X] Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
  • [ ] If possible, make a PR with a failing test to give us a starting point to work on!

Describe the bug

CUDA-Q currently is built against libstdc++. Building against a different standard library generally requires updates to the compiler. Specifically, when building against libc++ (built from source along with the other LLVM dependencies), the following llvm-lit tests fail:

In test folder:

  • [x] AST-Quake/reverse.cpp
  • [x] AST-Quake/vector_ctor_initlist.cpp
  • [x] AST-Quake/vector_ctor_initlist_int.cpp
  • [x] AST-Quake/vector_ctor_sized.cpp
  • [x] AST-Quake/vector_front_back.cpp

In targettests folder:

  • [x] execution/mapping_test-1-cpp17.cpp
  • [x] execution/mapping_test-1.cpp
  • [x] execution/qir_cond_for_loop-3.cpp
  • [x] execution/sim_gate_timing-cpp17.cpp
  • [x] execution/sim_gate_timing.cpp
  • [ ] CUDAQ-Target :: Kernel/inline-qpu-func.cpp (fails with a type traversal issue in TraverseStmt)
  • [x] Kernel/signaure-2.cpp (small struct not passed by value correctly)

In the unittests folder:

  • [ ] tensornet_CustomUnitaryTester.checkSimple and the same for tensornet_mps

Steps to reproduce the bug

Check out the PR branch https://github.com/NVIDIA/cuda-quantum/pull/1603, and remove the excludes listed under this bug in docker/build/assets.Dockerfile.

Expected behavior

All tests should pass.

Is this a regression? If it is, put the last known working version (or commit) here.

Possibly, but we haven't tested for libc++ so far

Environment

ghcr.io/nvidia/cuda-quantum-assets docker image

Suggestions

No response

bettinaheim avatar May 24 '24 13:05 bettinaheim