Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/format-python.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 14 additions & 0 deletions include/memory/container.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ concept numeric = std::is_arithmetic_v<T>;
*/
template <numeric T> struct device_span : public std::span<T> {
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<T>::__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<T> data, device dev) : std::span<T>(data), dev(dev) {}
device_span() : std::span<T>(), dev(device::unknown) {}
template <class Allocator>
Expand Down