From 3f7272db377ed4b1ddd168466031c3f9e45a9a19 Mon Sep 17 00:00:00 2001 From: Ivana Date: Thu, 17 Sep 2026 14:53:41 +0000 Subject: [PATCH 1/4] fix(utils): include in vec_intersect.cpp vec_intersect.cpp calls std::back_inserter in vec2d_intersect, vec_intersect and both vec_intersect_ overloads, and std::distance in vec_intersect_, but includes only and . Both names are declared in . libstdc++ reaches them anyway because and pull in , so the missing include is invisible on Linux. libc++ drops those transitive includes in C++20 mode, which is the mode this project builds in (CMAKE_CXX_STANDARD 20), so the file does not compile on macOS: src/utils/vec_intersect.cpp:18:76: error: no member named 'back_inserter' in namespace 'std' Include directly. This is the only file under src/ or include/ that names back_inserter or std::distance without it. Co-Authored-By: Claude --- src/utils/vec_intersect.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/vec_intersect.cpp b/src/utils/vec_intersect.cpp index 51eea1258..b092bdac8 100644 --- a/src/utils/vec_intersect.cpp +++ b/src/utils/vec_intersect.cpp @@ -1,6 +1,7 @@ #include "utils/vec_intersect.hpp" #include "utils/vec2d_col_sort.hpp" #include +#include #include namespace cytnx { From 71402fc6e7e3f110fad0e6053fa6af046a2c2518 Mon Sep 17 00:00:00 2001 From: Ivana Date: Thu, 17 Sep 2026 15:41:00 +0000 Subject: [PATCH 2/4] fix(build): pin nvidia-nvvm and nvidia-cuda-crt to the nvcc version CUDA_BUILD_TOOLCHAIN in tools/prepare_cuda_release.py pins nvidia-cuda-nvcc, which supplies ptxas, but not nvidia-nvvm, which supplies cicc. nvcc splits the device compile between them: cicc emits the PTX and ptxas assembles it, and ptxas rejects a PTX ISA newer than its own. Neither nvidia-nvvm nor nvidia-cuda-crt is named in the list today. They reach the toolchain through nvidia-cuda-nvcc, whose requires_dist is ["nvidia-nvvm", "nvidia-cuda-runtime", "nvidia-cuda-crt"] with no version bounds, so pip resolves them to the newest CUDA minor version available while ptxas stays on the pinned one. Resolving the current list shows the split: nvidia-cuda-nvcc 13.3.73 <- ptxas nvidia-nvvm 13.4.92 <- cicc nvidia-cuda-crt 13.4.92 A 13.4 cicc emits PTX ISA 9.4, which the 13.3 ptxas cannot assemble, so the CUDA wheel build fails at enable_language(CUDA) in CMakeLists.txt:270, before any project source is compiled: ptxas tmp/CMakeCUDACompilerId.ptx, line 9; fatal : Unsupported .version 9.4; current version is '9.3' Pin both to nvcc's own version so the whole compiler comes from one CUDA minor release. Re-resolving with the pins puts nvidia-cuda-nvcc, nvidia-nvvm and nvidia-cuda-crt all on 13.3.73. Co-Authored-By: Claude --- tools/prepare_cuda_release.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/prepare_cuda_release.py b/tools/prepare_cuda_release.py index 2216a3328..76fff6eda 100644 --- a/tools/prepare_cuda_release.py +++ b/tools/prepare_cuda_release.py @@ -87,6 +87,15 @@ # dropped here since this only ever runs inside the Linux manylinux container. CUDA_BUILD_TOOLCHAIN = [ "nvidia-cuda-nvcc ~=13.3.73", + # nvidia-nvvm and nvidia-cuda-crt are not listed here because the build + # calls them directly -- they arrive as unpinned dependencies of + # nvidia-cuda-nvcc, which lets pip resolve them to a newer CUDA minor + # version than the nvcc above. They are parts of the same compiler: + # cicc (nvidia-nvvm) emits the PTX that ptxas (nvidia-cuda-nvcc) + # assembles, and ptxas rejects a PTX ISA newer than its own. Must match + # the nvidia-cuda-nvcc version above. + "nvidia-nvvm ~=13.3.73", + "nvidia-cuda-crt ~=13.3.73", "nvidia-cuda-cccl ~=13.3.3.4.1", ] + [ spec.split(";")[0].strip() for spec in CUDA_RUNTIME_DEPENDENCIES From 4b4ee23e34ec2aa2bf0873333f36fe2455946cf7 Mon Sep 17 00:00:00 2001 From: Ivana Date: Thu, 17 Sep 2026 15:48:11 +0000 Subject: [PATCH 3/4] fix(build): mirror the nvcc component pins in pixi.toml pixi.toml's [target.linux-64.pypi-dependencies] block states that its version ranges must match CUDA_BUILD_TOOLCHAIN and CUDA_RUNTIME_DEPENDENCIES in tools/prepare_cuda_release.py. It pinned nvidia-cuda-nvcc but not nvidia-nvvm or nvidia-cuda-crt, which nvidia-cuda-nvcc requires without version bounds. pixi.lock currently holds all three at 13.3.73, so existing environments are unaffected. A re-resolve, however, was free to pick a 13.4 cicc (nvidia-nvvm) against the pinned 13.3 ptxas (nvidia-cuda-nvcc), which reproduces locally the unsupported-PTX-ISA failure the release path now guards against. Add the two constraints so both paths hold the whole compiler to one CUDA minor release. `pixi lock` reports the lock file already up to date -- the locked versions satisfy the new ranges -- so pixi.lock is unchanged. Co-Authored-By: Claude --- pixi.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pixi.toml b/pixi.toml index e6ec1f377..f69f67622 100644 --- a/pixi.toml +++ b/pixi.toml @@ -104,6 +104,12 @@ mkl-devel = "*" # itself is deliberately absent, as it is from the release list: it drags in # cudensitymat, cupauliprop and custabilizer, none of which cytnx links. nvidia-cuda-nvcc = "~=13.3.73" +# Named although nvidia-cuda-nvcc already depends on them: it does so without +# version bounds, which lets a re-resolve pick a newer CUDA minor version for +# cicc (nvidia-nvvm) than for ptxas (nvidia-cuda-nvcc), and ptxas rejects a +# PTX ISA newer than its own. Must match nvidia-cuda-nvcc above. +nvidia-nvvm = "~=13.3.73" +nvidia-cuda-crt = "~=13.3.73" nvidia-cuda-cccl = "~=13.3.3.4.1" nvidia-cuda-runtime = "~=13.3.29" nvidia-cublas = "~=13.6.0.2" From 194a42ffc1b8b8b0384b5f11ee3ef5b18db06401 Mon Sep 17 00:00:00 2001 From: Ivana Date: Fri, 18 Sep 2026 04:12:20 +0000 Subject: [PATCH 4/4] docs(build): reword the nvvm/crt pin comment to match pixi.toml The comment opened "nvidia-nvvm and nvidia-cuda-crt are not listed here because the build calls them directly", two lines above the entries that list them. The intended reading is that direct use is not the reason they appear, but the sentence parses first as a claim that they are absent. Restate it the way the equivalent comment in pixi.toml already does -- named despite nvidia-cuda-nvcc depending on them, because that dependency carries no version bound -- so both copies read the same way. Comment text only; CUDA_BUILD_TOOLCHAIN is unchanged. Co-Authored-By: Claude --- tools/prepare_cuda_release.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/prepare_cuda_release.py b/tools/prepare_cuda_release.py index 76fff6eda..2d7b9b105 100644 --- a/tools/prepare_cuda_release.py +++ b/tools/prepare_cuda_release.py @@ -87,13 +87,11 @@ # dropped here since this only ever runs inside the Linux manylinux container. CUDA_BUILD_TOOLCHAIN = [ "nvidia-cuda-nvcc ~=13.3.73", - # nvidia-nvvm and nvidia-cuda-crt are not listed here because the build - # calls them directly -- they arrive as unpinned dependencies of - # nvidia-cuda-nvcc, which lets pip resolve them to a newer CUDA minor - # version than the nvcc above. They are parts of the same compiler: - # cicc (nvidia-nvvm) emits the PTX that ptxas (nvidia-cuda-nvcc) - # assembles, and ptxas rejects a PTX ISA newer than its own. Must match - # the nvidia-cuda-nvcc version above. + # Named although nvidia-cuda-nvcc already depends on them: it does so + # without version bounds, which lets pip resolve a newer CUDA minor + # version for cicc (nvidia-nvvm) than for ptxas (nvidia-cuda-nvcc), and + # ptxas rejects a PTX ISA newer than its own. Must match the + # nvidia-cuda-nvcc version above. "nvidia-nvvm ~=13.3.73", "nvidia-cuda-crt ~=13.3.73", "nvidia-cuda-cccl ~=13.3.3.4.1",