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 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