Skip to content

Commit 6c73f3a

Browse files
authored
Merge pull request #2102 from glotzerlab/cuda-12.9
Support CUDA 12.9
2 parents 929fc94 + 94675b9 commit 6c73f3a

File tree

7 files changed

+18
-14
lines changed

7 files changed

+18
-14
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Change Log
1919
(`#2097 <https://github.com/glotzerlab/hoomd-blue/pull/2097>`__).
2020
* Equations displayed in ``hoomd.hpmc.compute.SDF`` documentation
2121
(`#2096 <https://github.com/glotzerlab/hoomd-blue/discussions/2096>`__).
22+
* Support CUDA 12.9
23+
(`#2102 <https://github.com/glotzerlab/hoomd-blue/discussions/2102>`__).
2224

2325
5.3.0 (2025-06-26)
2426
^^^^^^^^^^^^^^^^^^

hoomd/WarpTools.cuh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#else
2525
#include <cub/warp/warp_reduce.cuh>
2626
#include <cub/warp/warp_scan.cuh>
27+
#include <cuda/std/type_traits>
2728
#endif
2829

2930
#ifndef __CUDACC_RTC__
@@ -89,7 +90,7 @@ class WarpReduce
8990
#ifdef __HIP_PLATFORM_HCC__
9091
return Reduce(input, hipcub::Sum());
9192
#else
92-
return Reduce(input, cub::Sum());
93+
return Reduce(input, ::cuda::std::plus<> {});
9394
#endif
9495
}
9596

@@ -108,7 +109,7 @@ class WarpReduce
108109
#ifdef __HIP_PLATFORM_HCC__
109110
return Reduce(input, hipcub::Sum(), valid_items);
110111
#else
111-
return Reduce(input, cub::Sum(), valid_items);
112+
return Reduce(input, ::cuda::std::plus<> {}, valid_items);
112113
#endif
113114
}
114115

@@ -154,8 +155,7 @@ class WarpReduce
154155
typedef hipcub::WarpReduce<T, LOGICAL_WARP_THREADS, PTX_ARCH>
155156
MyWarpReduce; //!< CUB shuffle-based reduce
156157
#else
157-
typedef cub::WarpReduce<T, LOGICAL_WARP_THREADS, PTX_ARCH>
158-
MyWarpReduce; //!< CUB shuffle-based reduce
158+
typedef cub::WarpReduce<T, LOGICAL_WARP_THREADS> MyWarpReduce; //!< CUB shuffle-based reduce
159159
#endif
160160
typedef typename MyWarpReduce::TempStorage
161161
TempStorage; //!< Nominal data type for CUB temporary storage
@@ -221,7 +221,7 @@ class WarpScan
221221
#ifdef __HIP_PLATFORM_HCC__
222222
InclusiveScan(input, output, hipcub::Sum());
223223
#else
224-
InclusiveScan(input, output, cub::Sum());
224+
InclusiveScan(input, output, ::cuda::std::plus<> {});
225225
#endif
226226
}
227227

@@ -239,7 +239,7 @@ class WarpScan
239239
#ifdef __HIP_PLATFORM_HCC__
240240
InclusiveScan(input, output, hipcub::Sum(), aggregate);
241241
#else
242-
InclusiveScan(input, output, cub::Sum(), aggregate);
242+
InclusiveScan(input, output, ::cuda::std::plus<> {}, aggregate);
243243
#endif
244244
}
245245

@@ -295,7 +295,7 @@ class WarpScan
295295
#ifdef __HIP_PLATFORM_HCC__
296296
ExclusiveScan(input, output, initial, hipcub::Sum());
297297
#else
298-
ExclusiveScan(input, output, initial, cub::Sum());
298+
ExclusiveScan(input, output, initial, ::cuda::std::plus<> {});
299299
#endif
300300
}
301301

@@ -314,7 +314,7 @@ class WarpScan
314314
#ifdef __HIP_PLATFORM_HCC__
315315
ExclusiveScan(input, output, initial, hipcub::Sum(), aggregate);
316316
#else
317-
ExclusiveScan(input, output, initial, cub::Sum(), aggregate);
317+
ExclusiveScan(input, output, initial, ::cuda::std::plus<> {}, aggregate);
318318
#endif
319319
}
320320

@@ -424,7 +424,7 @@ class WarpScan
424424
typedef hipcub::WarpScan<T, LOGICAL_WARP_THREADS, PTX_ARCH>
425425
MyWarpScan; //!< CUB shuffle-based scan
426426
#else
427-
typedef cub::WarpScan<T, LOGICAL_WARP_THREADS, PTX_ARCH> MyWarpScan; //!< CUB shuffle-based scan
427+
typedef cub::WarpScan<T, LOGICAL_WARP_THREADS> MyWarpScan; //!< CUB shuffle-based scan
428428
#endif
429429
typedef typename MyWarpScan::TempStorage
430430
TempStorage; //!< Nominal data type for CUB temporary storage

hoomd/extern/hipper

hoomd/mpcd/ParticleData.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#pragma GCC diagnostic ignored "-Wconversion"
1515
#include <cub/device/device_partition.cuh>
1616
#include <cub/iterator/counting_input_iterator.cuh>
17+
#include <thrust/iterator/counting_iterator.h>
1718
#pragma GCC diagnostic pop
1819

1920
namespace hoomd
@@ -155,7 +156,7 @@ cudaError_t mpcd::gpu::partition_particles(void* d_tmp,
155156
unsigned int* d_num_remove,
156157
const unsigned int N)
157158
{
158-
cub::CountingInputIterator<unsigned int> ids(0);
159+
thrust::counting_iterator<unsigned int> ids(0);
159160
cub::DevicePartition::Flagged(d_tmp,
160161
tmp_bytes,
161162
ids,

hoomd/mpcd/RejectionVirtualParticleFillerGPU.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
#include <hipcub/hipcub.hpp>
10+
#include <thrust/iterator/counting_iterator.h>
1011

1112
#include "RejectionVirtualParticleFillerGPU.cuh"
1213

@@ -58,7 +59,7 @@ compact_virtual_particle_indices(void* d_tmp,
5859
unsigned int* d_keep_indices,
5960
unsigned int* d_num_keep)
6061
{
61-
cub::CountingInputIterator<int> itr(0);
62+
thrust::counting_iterator<int> itr(0);
6263
cub::DeviceSelect::Flagged(d_tmp,
6364
tmp_bytes,
6465
itr,

0 commit comments

Comments
 (0)