Skip to content

Commit 7eae5b2

Browse files
authored
Follow-up to #333 - fix wheel builds (#337)
This PR fixes a few issues with wheel builds and wheel testing: * fixes build issues with #333 * temporarily fixes test issues with TensorRT: NVIDIA/TensorRT#4614
1 parent c827537 commit 7eae5b2

File tree

7 files changed

+26
-5
lines changed

7 files changed

+26
-5
lines changed

.github/workflows/scripts/build_wheels.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,15 @@ $python -m build --wheel
158158

159159
CUDAQ_EXCLUDE_LIST=$(for f in $(find $cudaq_prefix/lib -name "*.so" -printf "%P\n" | sort); do echo "--exclude $f"; done | tr '\n' ' ')
160160

161+
# We need to exclude a few libraries to prevent auditwheel from mistakenly grafting them into the wheel.
161162
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(pwd)/_skbuild/lib:$tensorrt_path/lib" \
162163
$python -m auditwheel -v repair dist/*.whl $CUDAQ_EXCLUDE_LIST \
163164
--wheel-dir /wheels \
164165
--exclude libcudart.so.${cuda_version} \
165166
--exclude libnvinfer.so.10 \
166167
--exclude libnvonnxparser.so.10 \
168+
--exclude libcudaq-qec.so \
169+
--exclude libcudaq-qec-realtime-decoding.so \
167170
${PLAT_STR}
168171

169172
# ==============================================================================

Building.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,11 @@ export PYTHONPATH=${CUDAQ_INSTALL_PREFIX}:${CUDAQX_INSTALL_PREFIX}
5555
export PATH="${CUDAQ_INSTALL_PREFIX}/bin:${CUDAQX_INSTALL_PREFIX}/bin:${PATH}"
5656
ctest
5757
# Run the python tests
58-
# The --ignore option is to bypass tests that require additional packages not contained in
58+
# The --ignore option is to bypass tests that require additional packages not contained in
5959
# the standard docker container
6060
cd ..
6161
python3 -m pytest -v libs/qec/python/tests --ignore libs/qec/python/tests/test_tensor_network_decoder.py
6262
python3 -m pytest -v libs/solvers/python/tests --ignore libs/solvers/python/tests/test_gqe.py
63-
6463
```
6564

6665
If you want to change which version of CUDA-Q that CUDA-QX is paired with, you
@@ -81,3 +80,14 @@ contributing to CUDA-QX, but it should be noted that while this environment
8180
will have many GPU-accelerated simulators installed in it, it won't contain the
8281
*highest* performing CUDA-Q simulators. See [this note](https://nvidia.github.io/cuda-quantum/latest/using/install/data_center_install.html)
8382
for more details.
83+
84+
## Building CUDA-QX Documentation from Source
85+
86+
If you want to build and render our documentation from source, you can do this
87+
with the same environment as above. In particular, after running `ninja install`,
88+
you can run `ninja docs`. This places the documentation into the
89+
`/workspaces/cudaqx/build/docs/build/` directory. From there, you can open
90+
the `index.html` file in your browser, or if you are using VSCode or Cursor, you
91+
can simply browse to the `index.html` file in the Explorer panel, right click on
92+
the file, and select "Open with Live Server", and that will open your browser
93+
with the main docs page loaded automatically.

libs/qec/lib/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,4 @@ install(DIRECTORY ${CUDAQX_QEC_INCLUDE_DIR}/cudaq
9393
FILES_MATCHING PATTERN "*.h"
9494
)
9595

96-
if (NOT SKBUILD)
97-
add_subdirectory(realtime)
98-
endif()
96+
add_subdirectory(realtime)

libs/qec/lib/realtime/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ set_target_properties(cudaq-qec-realtime-decoding PROPERTIES
4343

4444

4545
install(TARGETS cudaq-qec-realtime-decoding
46+
COMPONENT qec-lib
4647
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
4748
)
4849

libs/qec/lib/realtime/quantinuum/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ set_target_properties(cudaq-qec-realtime-decoding-quantinuum PROPERTIES
4949
)
5050

5151
install(TARGETS cudaq-qec-realtime-decoding-quantinuum
52+
COMPONENT qec-lib
5253
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
5354
)
5455

@@ -65,5 +66,6 @@ set_target_properties(cudaq-qec-realtime-decoding-cudaq-stubs PROPERTIES
6566
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
6667

6768
install(TARGETS cudaq-qec-realtime-decoding-cudaq-stubs
69+
COMPONENT qec-lib
6870
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
6971

libs/qec/lib/realtime/simulation/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ set_target_properties(cudaq-qec-realtime-decoding-simulation PROPERTIES
4343

4444

4545
install(TARGETS cudaq-qec-realtime-decoding-simulation
46+
COMPONENT qec-lib
4647
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
4748
)
4849

scripts/ci/test_wheels.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ elif [[ "$cuda_version" == "12" ]]; then
6969
${python} -m pip install torch==2.9.0 --index-url https://download.pytorch.org/whl/cu126
7070
fi
7171

72+
# Temporary hack until tensorrt-cu13 bumps its package version to accommodate
73+
# for the breaking change in nvidia-cuda-runtime-cu13.
74+
if [[ "$cuda_version" == "13" ]]; then
75+
${python} -m pip install ${FIND_LINKS} "nvidia-cuda-runtime-cu13==0.0.0a0"
76+
fi
77+
7278
# QEC library
7379
# ======================================
7480

0 commit comments

Comments
 (0)