From 065b13a45a9dd85d66838bcd188e41f37553728c Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 10 Jul 2026 14:02:48 +0000 Subject: [PATCH 1/2] fix: build with GCC 15 / CUDA >= 13 libstdc++ 15 makes the tag type of std::span's iterator (std::span::__iter_tag) a private member. When a span iterator is passed to a thrust/CUB device algorithm (e.g. thrust::transform in MobilityInterface::sqrtMdotW), nvcc emits host stub code that names that private type, which GCC 15 rejects ("__iter_tag is private within this context"). This breaks builds with CUDA >= 13 against GCC 15. Give device_span raw-pointer begin()/end() so the private tag is never instantiated. device_span remains a valid contiguous range and every solver funnels through it, so this fixes all of them at once. --- include/memory/container.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/memory/container.h b/include/memory/container.h index 4c5e6a2e..0681e0e0 100644 --- a/include/memory/container.h +++ b/include/memory/container.h @@ -23,6 +23,20 @@ concept numeric = std::is_arithmetic_v; */ template struct device_span : public std::span { device dev; + // Return raw pointers from begin()/end() instead of std::span's iterators. + // + // In libstdc++ 15 the tag type of std::span's iterator + // (std::span::__iter_tag) is a private member. When a span iterator is + // handed to a thrust/CUB device algorithm (e.g. thrust::transform in + // MobilityInterface::sqrtMdotW), nvcc generates host stub code that names + // that private type, which GCC 15 rejects ("__iter_tag is private within + // this context"). This surfaces with CUDA >= 13 (whose bundled thrust/CUB + // routes span iterators through this path) built against GCC 15. + // + // Handing out raw pointers keeps device_span a valid contiguous range while + // ensuring the private tag is never instantiated. + constexpr T *begin() const noexcept { return this->data(); } + constexpr T *end() const noexcept { return this->data() + this->size(); } device_span(std::span data, device dev) : std::span(data), dev(dev) {} device_span() : std::span(), dev(device::unknown) {} template From d7f67b212524cbf52433506abb601fd38e808b13 Mon Sep 17 00:00:00 2001 From: RaulPPelaez Date: Fri, 10 Jul 2026 16:35:03 +0200 Subject: [PATCH 2/2] ci: fix permissions --- .github/workflows/format-python.yml | 6 +++++- .github/workflows/format.yml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/format-python.yml b/.github/workflows/format-python.yml index 24b3127e..565c01d2 100644 --- a/.github/workflows/format-python.yml +++ b/.github/workflows/format-python.yml @@ -1,16 +1,20 @@ name: Python Formatting Check on: - pull_request: + pull_request_target: types: [opened, synchronize, reopened] jobs: python-black-check: runs-on: ubuntu-latest + permissions: + pull-requests: write steps: - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Set up Python uses: actions/setup-python@v5 diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 54d64135..151a2c06 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,16 +1,20 @@ name: Clang-Format Lint Check on: - pull_request: + pull_request_target: types: [opened, synchronize, reopened] jobs: clang-format-check: runs-on: ubuntu-latest + permissions: + pull-requests: write steps: - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Install clang-format run: sudo apt-get update && sudo apt-get install -y clang-format-19