Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
29b3311
Partially revert "[rocThrust] fix: HIP compiler rejects THRUST_NODISC…
yungshengtu Oct 2, 2025
a86449c
Revert "Fix rocThrust 2.8.5 NVCC job failures (#1770)"
yungshengtu Oct 2, 2025
cbf9ad0
Revert "rocThrust CCCL 2.8.5 changes (#1394)"
yungshengtu Oct 2, 2025
4ab0cb8
prepare for libhipcxx
yungshengtu Jul 17, 2026
fa9f5e2
Bump main to 2.9.0.
yungshengtu Oct 2, 2025
94e2e23
Drop cub::Mutex
yungshengtu Oct 2, 2025
3c63123
Remove thrust::[unary|binary]_traits
yungshengtu Oct 2, 2025
15e443b
Bump main to 3.0.0.
yungshengtu Oct 2, 2025
6975a25
Drop thrust not1 and not2
yungshengtu Oct 2, 2025
c36dc87
Require at least gcc7
yungshengtu Oct 2, 2025
43524f6
Drop thrust::[unary|binary]_function
yungshengtu Oct 7, 2025
1868eb4
Enable thrust::identity test for non-MSVC
yungshengtu Oct 7, 2025
03e8a05
Enable PDL in triple chevron launch
yungshengtu Oct 7, 2025
916ab7c
Drop ICC support in code
yungshengtu Oct 7, 2025
09b4522
[pre-commit.ci] pre-commit autoupdate
yungshengtu Oct 7, 2025
8cd4a50
Drop Thrust legacy arch macros
yungshengtu Oct 7, 2025
905c254
Drop Thrust's compiler_fence.h
yungshengtu Oct 7, 2025
107f766
Drop CTK 11.x from CI
yungshengtu Oct 7, 2025
e1c60b5
Drop Thrust's deprecated compiler macros
yungshengtu Oct 8, 2025
50f2945
Drop CUB_RUNTIME_ENABLED and __THRUST_HAS_CUDART__
yungshengtu Oct 10, 2025
3da2e9f
Require C++17 for compiling Thrust and CUB
yungshengtu Oct 10, 2025
03b71cd
Deprecate Thrust's cpp_compatibility.h macros
yungshengtu Oct 13, 2025
54cd017
Drop CDPv1
yungshengtu Oct 10, 2025
5637b99
Drop thrust::void_t
yungshengtu Oct 10, 2025
382240a
Use cuda::std::addressof in Thrust
yungshengtu Oct 10, 2025
92787f5
Fix all_of documentation for empty ranges
yungshengtu Oct 10, 2025
6fef64f
Drop deprecated aliases in Thrust functional
yungshengtu Oct 13, 2025
426ef99
Use cuda::std::min/max in Thrust
yungshengtu Oct 13, 2025
cb91806
Deprecate thrust::null_type
yungshengtu Oct 13, 2025
161d1a6
Deprecate thrust::async
yungshengtu Oct 14, 2025
52f17be
Review/Deprecate CUB util.ptx for CCCL 2.x
yungshengtu Oct 14, 2025
e615c57
Deprecate thrust::numeric_limits
yungshengtu Oct 14, 2025
08f6adb
Deprecate thrust::optional
yungshengtu Oct 14, 2025
d33a78a
Redefine and deprecate thrust::remove_cvref
yungshengtu Oct 14, 2025
27b28c7
Replace and deprecate thrust::cuda_cub::terminate
yungshengtu Oct 14, 2025
3f2b0a5
Remove deprecated cub::min
yungshengtu Oct 14, 2025
cf75a54
Moves agents to detail::<algorithm_name> namespace
yungshengtu Oct 14, 2025
74fae65
uses unsigned offset types in thrust's scan dispatch
yungshengtu Oct 14, 2025
49828a5
Default transform_iterator's copy ctor
yungshengtu Oct 14, 2025
d51cef1
Turn C++ dialect warning into error
yungshengtu Oct 14, 2025
fd7d108
Uses unsigned offset types in thrust's sort algorithm calling into Di…
yungshengtu Oct 14, 2025
b0be003
Refactor allocator handling of contiguous_storage
yungshengtu Oct 14, 2025
6de87db
Drop thrust::detail::integer_traits
yungshengtu Oct 15, 2025
af76e30
Deprecate thrust universal iterator categories
yungshengtu Oct 15, 2025
5646c07
Drop universal iterator categories
yungshengtu Oct 15, 2025
30807d3
Refactor CUB's util_debug
yungshengtu Oct 15, 2025
d90240a
Drop thrust numeric_traits
yungshengtu Oct 15, 2025
9804d25
Deprecate and replace thrust::cuda_cub iterators
yungshengtu Oct 15, 2025
3e4dd67
Deprecate thrust macros from type_deduction.h
yungshengtu Oct 15, 2025
bdd2e27
Deprecate thrust event, future and more
yungshengtu Oct 15, 2025
a7941aa
Extract merge sort kernels to NVRTC compilable header
yungshengtu Oct 15, 2025
1160e67
Drop thrust::null_type
yungshengtu Oct 15, 2025
1896c10
Deprecate macros from cuda/detail/core/util.h
yungshengtu Oct 15, 2025
1c1316b
Deprecate thrust logical meta functions
yungshengtu Oct 15, 2025
0e94e02
Fix transform iterator for non-copy-constructible types
yungshengtu Oct 16, 2025
0c92f30
Try and get rapids green
yungshengtu Oct 16, 2025
2cf5d86
fixes return type of tabulate out iter
yungshengtu Oct 16, 2025
464fcbc
Remove all code paths and policies for SM37 and below
yungshengtu Oct 16, 2025
e4fd134
Internalize cuda/detail/core/util.h
yungshengtu Oct 16, 2025
887005b
Remove LEGACY_PTX_ARCH
yungshengtu Oct 16, 2025
fbe7617
Remove CUDA 11.x support
yungshengtu Oct 16, 2025
d8a20d5
Try and make nvrtc on windows possible
yungshengtu Oct 16, 2025
4e18e2b
Internalize triple_chevron
yungshengtu Oct 16, 2025
e146f3c
Revert "Try and make nvrtc on windows possible (#3623)"
yungshengtu Oct 16, 2025
17b2043
Fix transform_iterator<identity> and drop result_of_adaptable_function
yungshengtu Oct 17, 2025
12b6e41
Replaces bool template parameters on Dispatch* class templates to use…
yungshengtu Oct 17, 2025
abd9c14
Fix issues with nvrtc compilation
yungshengtu Oct 17, 2025
9ed08a4
Function-like macros for FP6/BF16 macros
yungshengtu Oct 17, 2025
a918c0d
Drop MSVC 2005 workaround
yungshengtu Oct 17, 2025
2130f73
Deprecate cub::AliasTemporaries
yungshengtu Oct 17, 2025
95d902d
remove MSVC 2017 paths
yungshengtu Oct 17, 2025
8ca7f54
[Thrust] Remove pre-c++17 conditions and code
yungshengtu Oct 17, 2025
7af4bdd
Make thrust iterators work with NVRTC
yungshengtu Oct 17, 2025
b7b06e3
Deprecate and replace thrust::identity
yungshengtu Oct 20, 2025
44915c5
Drop Thrust's global workaround
yungshengtu Oct 20, 2025
e845c25
Move zip_iterator to internally use cuda::std::tuple
yungshengtu Oct 20, 2025
5306af2
Add b200 tunings for scan.exclusive.sum
yungshengtu Oct 20, 2025
cbad5bc
Move ForceInclusive parameter of DispatchScan before policy
yungshengtu Oct 20, 2025
e7fdd6e
Drop thrust::future|event|async::*
yungshengtu Oct 20, 2025
6563cbb
Drop Thrust's cpp_compatibility.h
yungshengtu Oct 20, 2025
9350647
Drop thrust::identity
yungshengtu Oct 20, 2025
f2ff138
Reinstate thrust::optional
yungshengtu Oct 20, 2025
9d4cb2b
Replace _CCCL_IF_CONSTEXPR
yungshengtu Oct 21, 2025
ddaf311
fix _LIBCUDACXX_HAS_NO_INT128
yungshengtu Oct 21, 2025
aa7a4d7
Drop small deprecated entites
yungshengtu Oct 21, 2025
90adad5
Refactor Thrust allocator example
yungshengtu Oct 21, 2025
1b99f29
Refactor thrust::zip_iterator
yungshengtu Oct 21, 2025
576238f
Refactor Thrust iterators 2/n
yungshengtu Oct 21, 2025
e35a4fb
Refactor Thrust iterators 3/4
yungshengtu Oct 21, 2025
1b496da
Refactor Thrust iterators 4/4
yungshengtu Oct 21, 2025
08d820f
Refactor Thrust iterators 1/n
yungshengtu Oct 21, 2025
817c957
Refactor iterator_traits
yungshengtu Oct 21, 2025
317b8f1
Move transform kernels to NVRTC compilable header
yungshengtu Oct 21, 2025
1ddc08c
Drop join_iterator
yungshengtu Oct 21, 2025
c3ecb2c
Revert Thrust find_if_not implementation to please nvc++
yungshengtu Oct 21, 2025
df0c1fe
Drop deprecated iterators from Thrust cuda utils
yungshengtu Oct 21, 2025
e006da3
Refactor Thrust iterator internals
yungshengtu Oct 22, 2025
812bc97
Revert Thrust mismatch implementation to please nvc++
yungshengtu Oct 22, 2025
18a0842
Move to cuda::std::iterator_traits in CUB
yungshengtu Oct 22, 2025
9ee4721
Replace CUB macros in more places
yungshengtu Oct 22, 2025
451082f
Drop/internalize some macros
yungshengtu Oct 22, 2025
9cd35ed
Replace CUB macros in tunings and benchmarks
yungshengtu Oct 22, 2025
e0ed264
Deprecate and replace some Thrust iterator traits
yungshengtu Oct 22, 2025
2adacf5
Allow NVRTC to compile more of CUB
yungshengtu Oct 23, 2025
e6979cc
Drop obsolete thrust tuple algorithms
yungshengtu Oct 23, 2025
b59298b
Fix thrust::raw_reference_cast for tuple_of_iterator_references and s…
yungshengtu Oct 23, 2025
7df9ea3
Deprecate and replace THRUST_STATIC_ASSERT
yungshengtu Oct 23, 2025
fffd0f8
Refactor iterator_category helper
yungshengtu Oct 23, 2025
ed8102f
Fix definition of universal_host_pinned_memory_resource
yungshengtu Oct 23, 2025
fcaf89d
Refactor uses of thrust::iterator_traversal
yungshengtu Oct 23, 2025
3a858d7
Drop obsolete Thrust/CUDA async/inclusive_scan
yungshengtu Oct 23, 2025
ee7d8ce
Deprecate and replace THRUST_UNUSED_VAR
yungshengtu Oct 23, 2025
998f303
Fix NVHPC detection
yungshengtu Oct 23, 2025
262a5a3
Fix iterator trait deprecation messages
yungshengtu Oct 23, 2025
af5f1aa
Test tuple of iterator reference assignment
yungshengtu Oct 23, 2025
792b213
Extend Thrust iterator trait tests
yungshengtu Oct 23, 2025
b5052c9
Add tests for counting_iterator difference_type
yungshengtu Oct 23, 2025
ae06dd8
Rework counting_iterator difference_type
yungshengtu Oct 23, 2025
4ba44ff
Fix
yungshengtu Oct 23, 2025
f60978a
Simplify
yungshengtu Oct 23, 2025
00045f0
Deprecate Thrust simple macros
yungshengtu Oct 24, 2025
9baf741
Fix definition of <cuda/std/numbers>
yungshengtu Oct 24, 2025
bd3483c
Support proxy references in raw_reference_cast
yungshengtu Oct 24, 2025
11640f8
Remove obsolete deprecation warning suppressions
yungshengtu Oct 24, 2025
499ae8a
[thrust, docs] Use the variadic overload of make_zip_iterator in the …
yungshengtu Oct 24, 2025
6cd9a0e
Refactor and document thrust::allocate_unique et al.
yungshengtu Oct 24, 2025
60f2378
Link to universal_[host_pinned_][allocator|vector] in the docs
yungshengtu Oct 24, 2025
fbdea6b
Fix cub::DeviceTransform unwrapping cudax:async_buffer::iterator
yungshengtu Oct 24, 2025
95816fb
Add thrust::offset_iterator
yungshengtu Oct 24, 2025
280627a
Use _CCCL_PRAGMA_UNROLL in CCCL
yungshengtu Oct 27, 2025
881902a
Drop thrust::optional
yungshengtu Oct 27, 2025
e2471e8
Backport - Make compiler version comparisons safer
yungshengtu Oct 27, 2025
b30ebe8
[Thrust] Perform asynchronous allocations by default for the par_nosy…
yungshengtu Oct 27, 2025
8533259
Use cudaStream_t for thrust::device.on(...).
yungshengtu Oct 27, 2025
4cea75d
Missing forward include in iterator facade category
yungshengtu Oct 27, 2025
fde4ad8
Add load-bearing semicolon for MSVC in openMP sort
yungshengtu Oct 27, 2025
a544448
Handle upcoming vector type change
yungshengtu Oct 27, 2025
cee9fa4
Bump branch/3.0.x to 3.0.1.
yungshengtu Oct 31, 2025
3fd9883
Bump branch/3.0.x to 3.0.2.
yungshengtu Oct 31, 2025
9b35db7
Add a macro to disable PDL
yungshengtu Oct 31, 2025
651187b
Bump branch/3.0.x to 3.0.3.
yungshengtu Oct 31, 2025
f5993c8
v3.0.3
yungshengtu Oct 28, 2025
21c174e
fix compatability with libhipcxx
yungshengtu Nov 4, 2025
1fd6786
allow C++20, C++23 and C++26
yungshengtu Nov 12, 2025
0f0e683
update CHANGELOG.md
yungshengtu Nov 6, 2025
6f90aef
update versions of dependencies
yungshengtu Jun 29, 2026
ff7d3f2
work with gnu++17
yungshengtu Nov 24, 2025
39c9816
fix(rocthrust): various libhipcxx fixes
Naraenda Jan 9, 2026
fd91d4a
update copyright date
yungshengtu Jan 9, 2026
98242ac
fix benchmark error caused by #5953
yungshengtu Apr 16, 2026
f33fcce
reflect the idea of #6460
yungshengtu Jul 24, 2026
b5e0a8c
[rocThrust] Fix libcxx version check
matyas-streamhpc May 14, 2026
27db7c0
Merge branch 'develop' into users/yungshengtu/rocthrust-cccl-3-0-x-ch…
umfranzw Jul 25, 2026
2eb1f88
Temporarily skip misbehaving tests on gfx1151/Windows
umfranzw Jul 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 40 additions & 0 deletions projects/rocprim/test/rocprim/test_device_segmented_topk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,26 @@ void segmented_topk_large_sizes_test(bool debug_synchronous)

TEST(RocprimDeviceSegmentedTopkTests, SegmentedTopkLargeSizesStable)
{
// Temporarily disable this test on gfx115x on Windows until we can determine the root cause.
// TODO: remove this after the root cause has been found and fixed properly.
#if defined(_WIN32)
rocprim::detail::target_arch arch = rocprim::detail::target_arch::unknown;
if (rocprim::detail::host_target_arch(hipStreamDefault, arch) != HIP_SUCCESS)
{
std::cerr << "Warning: unable to fetch target architecture for disablement check." << std::endl;
}

const std::set<rocprim::detail::target_arch> disabled_arches = {
rocprim::detail::target_arch::gfx1150,
rocprim::detail::target_arch::gfx1151,
rocprim::detail::target_arch::gfx1152,
rocprim::detail::target_arch::gfx1153
};

if (disabled_arches.find(arch) != disabled_arches.end())
GTEST_SKIP() << "Skipping test on gfx1151 Windows systems due to known issues.";
#endif

constexpr bool descending = false;
constexpr bool stable = true;
using decomposer_t = rocprim::identity_decomposer;
Expand All @@ -934,6 +954,26 @@ TEST(RocprimDeviceSegmentedTopkTests, SegmentedTopkLargeSizesStable)

TEST(RocprimDeviceSegmentedTopkTests, TopkLargeSizesUnstable)
{
// Temporarily disable this test on gfx115x on Windows until we can determine the root cause.
// TODO: remove this after the root cause has been found and fixed properly.
#if defined(_WIN32)
rocprim::detail::target_arch arch = rocprim::detail::target_arch::unknown;
if (rocprim::detail::host_target_arch(hipStreamDefault, arch) != HIP_SUCCESS)
{
std::cerr << "Warning: unable to fetch target architecture for disablement check." << std::endl;
}

const std::set<rocprim::detail::target_arch> disabled_arches = {
rocprim::detail::target_arch::gfx1150,
rocprim::detail::target_arch::gfx1151,
rocprim::detail::target_arch::gfx1152,
rocprim::detail::target_arch::gfx1153
};

if (disabled_arches.find(arch) != disabled_arches.end())
GTEST_SKIP() << "Skipping test on gfx1151 Windows systems due to known issues.";
#endif

constexpr bool descending = false;
constexpr bool stable = false;
using decomposer_t = rocprim::identity_decomposer;
Expand Down
40 changes: 40 additions & 0 deletions projects/rocprim/test/rocprim/test_device_topk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,26 @@ void topk_large_sizes_test(bool debug_synchronous)

TEST(RocprimDeviceTopkTests, TopkLargeSizesStable)
{
// Temporarily disable this test on gfx115x on Windows until we can determine the root cause.
// TODO: remove this after the root cause has been found and fixed properly.
#if defined(_WIN32)
rocprim::detail::target_arch arch = rocprim::detail::target_arch::unknown;
if (rocprim::detail::host_target_arch(hipStreamDefault, arch) != HIP_SUCCESS)
{
std::cerr << "Warning: unable to fetch target architecture for disablement check." << std::endl;
}

const std::set<rocprim::detail::target_arch> disabled_arches = {
rocprim::detail::target_arch::gfx1150,
rocprim::detail::target_arch::gfx1151,
rocprim::detail::target_arch::gfx1152,
rocprim::detail::target_arch::gfx1153
};

if (disabled_arches.find(arch) != disabled_arches.end())
GTEST_SKIP() << "Skipping test on gfx1151 Windows systems due to known issues.";
#endif

constexpr bool descending = false;
constexpr bool stable = true;
using decomposer_t = rocprim::identity_decomposer;
Expand All @@ -943,6 +963,26 @@ TEST(RocprimDeviceTopkTests, TopkLargeSizesStable)

TEST(RocprimDeviceTopkTests, TopkLargeSizesUnstable)
{
// Temporarily disable this test on gfx115x on Windows until we can determine the root cause.
// TODO: remove this after the root cause has been found and fixed properly.
#if defined(_WIN32)
rocprim::detail::target_arch arch = rocprim::detail::target_arch::unknown;
if (rocprim::detail::host_target_arch(hipStreamDefault, arch) != HIP_SUCCESS)
{
std::cerr << "Warning: unable to fetch target architecture for disablement check." << std::endl;
}

const std::set<rocprim::detail::target_arch> disabled_arches = {
rocprim::detail::target_arch::gfx1150,
rocprim::detail::target_arch::gfx1151,
rocprim::detail::target_arch::gfx1152,
rocprim::detail::target_arch::gfx1153
};

if (disabled_arches.find(arch) != disabled_arches.end())
GTEST_SKIP() << "Skipping test on gfx1151 Windows systems due to known issues.";
#endif

constexpr bool descending = false;
constexpr bool stable = false;
using decomposer_t = rocprim::identity_decomposer;
Expand Down
2 changes: 1 addition & 1 deletion projects/rocthrust/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ AttributeMacros: [
'THRUST_HOST',
'THRUST_NODISCARD',
'THRUST_DEPRECATED',
'THRUST_INLINE_CONSTANT',
'THRUST_GLOBAL_CONSTANT',
# thrust
'_CCCL_ALIGNAS_TYPE',
'_CCCL_ALIGNAS',
Expand Down
9 changes: 9 additions & 0 deletions projects/rocthrust/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
Documentation for rocThrust available at
[https://rocm.docs.amd.com/projects/rocThrust/en/latest/](https://rocm.docs.amd.com/projects/rocThrust/en/latest/).

## rocThrust 5.0.0 for ROCm 10.0

### Added

* Largely in feature parity with CCCL/thrust v3.0.3.
- `thrust::tuple`, `thrust::pair` and `thrust::zip_iterator` fall back to rocThrust 4.4.0 implementations when a libhipcxx counterpart corresponding to CCCL/libcudacxx >= v3.0.3 is unavailable, ie
* `thrust::tuple` and `thrust::pair`: some features may differ from CCCL/thrust v3.0.3.
* `thrust::zip_iterator`: some iterator concepts present in CCCL/thrust v3.0.3 are missing.

## rocThrust 4.5.0 for ROCm 7.14

### Added
Expand Down
17 changes: 6 additions & 11 deletions projects/rocthrust/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
# Update these variables at release time
#
# Set the library version
set(VERSION_STRING "4.5.0")
set(VERSION_STRING "5.0.0")
# Set the minimum required rocPRIM version
set(MIN_ROCPRIM_PACKAGE_VERSION "4.0.0" CACHE STRING "Minimum version of rocPRIM to search for when ROCPRIM_FETCH_METHOD is set to PACKAGE.")
set(MIN_ROCPRIM_PACKAGE_VERSION "4.1.0" CACHE STRING "Minimum version of rocPRIM to search for when ROCPRIM_FETCH_METHOD is set to PACKAGE.")
# Set the minimum required rocRAND version
set(MIN_ROCRAND_PACKAGE_VERSION "4.0.0" CACHE STRING "Minimum version of rocRAND to search for when ROCRAND_FETCH_METHOD is set to PACKAGE.")
set(MIN_ROCRAND_PACKAGE_VERSION "4.1.0" CACHE STRING "Minimum version of rocRAND to search for when ROCRAND_FETCH_METHOD is set to PACKAGE.")
# Set download branch for dependencies rocPRIM and rocRAND
set(ROCM_DEP_RELEASE_BRANCH "release/therock-7.14" CACHE STRING "Download branch for ROCm dependencies")
# --------------------------------------
Expand All @@ -35,10 +35,9 @@ endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

if (CMAKE_CXX_STANDARD EQUAL 14)
message(WARNING "C++14 will be deprecated in the next major release")
elseif(NOT CMAKE_CXX_STANDARD EQUAL 17)
message(FATAL_ERROR "Only C++14 and C++17 are supported")
set(ALLOWED_CXX_STANDARDS 17 20 23 26)
if(NOT CMAKE_CXX_STANDARD IN_LIST ALLOWED_CXX_STANDARDS)
message(FATAL_ERROR "Only C++17, C++20, C++23 and C++26 are supported")
endif()

# Set HIP flags
Expand Down Expand Up @@ -202,10 +201,6 @@ if(NOT DISABLE_WERROR)
list(APPEND COMPILE_OPTIONS -Werror)
endif()

if(NOT CMAKE_CXX_STANDARD EQUAL 17)
message(FATAL_ERROR "Only C++17 is supported")
endif()

if (WIN32)
add_compile_options(-xhip)
add_compile_definitions(THRUST_IGNORE_DEPRECATED_CPP_DIALECT)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/******************************************************************************
* Copyright (c) 2011-2023, NVIDIA CORPORATION. All rights reserved.
* Modifications Copyright (c) 2024-2025, Advanced Micro Devices, Inc. All rights reserved.
* Modifications Copyright (c) 2024-2026, Advanced Micro Devices, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -110,10 +110,9 @@ void run_benchmark(benchmark::State& state, const std::size_t elements, const st
}

template <class Benchmark>
void add_benchmarks(
const std::string& name, std::vector<benchmark::internal::Benchmark*>& benchmarks, const std::string seed_type)
void add_benchmarks(const std::string& name, std::vector<benchmark::Benchmark*>& benchmarks, const std::string seed_type)
{
std::vector<benchmark::internal::Benchmark*> bs;
std::vector<benchmark::Benchmark*> bs;
BENCHMARK_TYPE(int8_t)
BENCHMARK_TYPE(int16_t)
BENCHMARK_TYPE(int32_t)
Expand All @@ -140,7 +139,7 @@ int main(int argc, char* argv[])
benchmark::AddCustomContext("seed", seed_type);

// Add benchmark
std::vector<benchmark::internal::Benchmark*> benchmarks;
std::vector<benchmark::Benchmark*> benchmarks;
add_benchmarks<basic>("basic", benchmarks, seed_type);

// Use manual timing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/******************************************************************************
* Copyright (c) 2011-2023, NVIDIA CORPORATION. All rights reserved.
* Modifications Copyright (c) 2024-2025, Advanced Micro Devices, Inc. All rights reserved.
* Modifications Copyright (c) 2024-2026, Advanced Micro Devices, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -128,10 +128,9 @@ void run_benchmark(benchmark::State& state, const std::size_t elements, const st
}

template <template <int> class Benchmark, int Val = 42 /*magic number in Thrust's benchmark*/>
void add_benchmarks(
const std::string& name, std::vector<benchmark::internal::Benchmark*>& benchmarks, const std::string seed_type)
void add_benchmarks(const std::string& name, std::vector<benchmark::Benchmark*>& benchmarks, const std::string seed_type)
{
std::vector<benchmark::internal::Benchmark*> bs;
std::vector<benchmark::Benchmark*> bs;
BENCHMARK_TYPE(int8_t)
BENCHMARK_TYPE(int16_t)
BENCHMARK_TYPE(int32_t)
Expand Down Expand Up @@ -159,7 +158,7 @@ int main(int argc, char* argv[])
benchmark::AddCustomContext("seed", seed_type);

// Add benchmark
std::vector<benchmark::internal::Benchmark*> benchmarks;
std::vector<benchmark::Benchmark*> benchmarks;
add_benchmarks<custom>("custom", benchmarks, seed_type);

// Use manual timing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/******************************************************************************
* Copyright (c) 2011-2023, NVIDIA CORPORATION. All rights reserved.
* Modifications Copyright (c) 2024-2025, Advanced Micro Devices, Inc. All rights reserved.
* Modifications Copyright (c) 2024-2026, Advanced Micro Devices, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -107,10 +107,9 @@ void run_benchmark(benchmark::State& state, const std::size_t elements, const st
}

template <class Benchmark>
void add_benchmarks(
const std::string& name, std::vector<benchmark::internal::Benchmark*>& benchmarks, const std::string seed_type)
void add_benchmarks(const std::string& name, std::vector<benchmark::Benchmark*>& benchmarks, const std::string seed_type)
{
std::vector<benchmark::internal::Benchmark*> bs;
std::vector<benchmark::Benchmark*> bs;
BENCHMARK_TYPE(int8_t)
BENCHMARK_TYPE(int16_t)
BENCHMARK_TYPE(int32_t)
Expand Down Expand Up @@ -138,7 +137,7 @@ int main(int argc, char* argv[])
benchmark::AddCustomContext("seed", seed_type);

// Add benchmark
std::vector<benchmark::internal::Benchmark*> benchmarks;
std::vector<benchmark::Benchmark*> benchmarks;
add_benchmarks<in_place>("in_place", benchmarks, seed_type);

// Use manual timing
Expand Down
9 changes: 4 additions & 5 deletions projects/rocthrust/benchmark/bench/copy/basic.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/******************************************************************************
* Copyright (c) 2011-2023, NVIDIA CORPORATION. All rights reserved.
* Modifications Copyright (c) 2024-2025, Advanced Micro Devices, Inc. All rights reserved.
* Modifications Copyright (c) 2024-2026, Advanced Micro Devices, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -139,10 +139,9 @@ static_assert(!_THRUST_STD::is_trivially_copyable<non_trivial>::value, ""); // a
static_assert(!thrust::is_trivially_relocatable<non_trivial>::value, ""); // thrust uses this check internally

template <class Benchmark>
void add_benchmarks(
const std::string& name, std::vector<benchmark::internal::Benchmark*>& benchmarks, const std::string seed_type)
void add_benchmarks(const std::string& name, std::vector<benchmark::Benchmark*>& benchmarks, const std::string seed_type)
{
std::vector<benchmark::internal::Benchmark*> bs;
std::vector<benchmark::Benchmark*> bs;
BENCHMARK_TYPE(int8_t)
BENCHMARK_TYPE(uint8_t)
BENCHMARK_TYPE(int16_t)
Expand Down Expand Up @@ -175,7 +174,7 @@ int main(int argc, char* argv[])
benchmark::AddCustomContext("seed", seed_type);

// Add benchmark
std::vector<benchmark::internal::Benchmark*> benchmarks;
std::vector<benchmark::Benchmark*> benchmarks;
add_benchmarks<basic>("basic", benchmarks, seed_type);

// Use manual timing
Expand Down
14 changes: 7 additions & 7 deletions projects/rocthrust/benchmark/bench/copy/if.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/******************************************************************************
* Copyright (c) 2011-2023, NVIDIA CORPORATION. All rights reserved.
* Modifications Copyright (c) 2024-2025, Advanced Micro Devices, Inc. All rights reserved.
* Modifications Copyright (c) 2024-2026, Advanced Micro Devices, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -32,6 +32,7 @@
// rocThrust
#include <thrust/copy.h>
#include <thrust/count.h>
#include <thrust/detail/config/namespace.h>
#include <thrust/device_vector.h>
#include <thrust/execution_policy.h>

Expand Down Expand Up @@ -93,7 +94,7 @@ void run_benchmark(
{
input = bench_utils::generate(elements, seed_type);
}
catch (const ::thrust::system::detail::bad_alloc& e)
catch (const THRUST_NS_QUALIFIER::system::detail::bad_alloc& e)
{
(void) hipGetLastError();
state.SkipWithError(("thrust::system::detail::bad_alloc: " + std::string(e.what())).c_str());
Expand All @@ -105,7 +106,7 @@ void run_benchmark(
{
output = thrust::device_vector<T>(selected_elements);
}
catch (const ::thrust::system::detail::bad_alloc& e)
catch (const THRUST_NS_QUALIFIER::system::detail::bad_alloc& e)
{
(void) hipGetLastError();
state.SkipWithError(("thrust::system::detail::bad_alloc: " + std::string(e.what())).c_str());
Expand Down Expand Up @@ -153,11 +154,10 @@ void run_benchmark(
}

template <class Benchmark>
void add_benchmarks(
const std::string& name, std::vector<benchmark::internal::Benchmark*>& benchmarks, const std::string seed_type)
void add_benchmarks(const std::string& name, std::vector<benchmark::Benchmark*>& benchmarks, const std::string seed_type)
{
constexpr int entropy_reductions[] = {0, 2, 4200}; // 1.000, 0.544, 0.000;
std::vector<benchmark::internal::Benchmark*> bs;
std::vector<benchmark::Benchmark*> bs;

BENCHMARK_TYPE_ENTROPY(int8_t, entropy_reductions)
BENCHMARK_TYPE_ENTROPY(int16_t, entropy_reductions)
Expand Down Expand Up @@ -187,7 +187,7 @@ int main(int argc, char* argv[])
benchmark::AddCustomContext("seed", seed_type);

// Add benchmark
std::vector<benchmark::internal::Benchmark*> benchmarks;
std::vector<benchmark::Benchmark*> benchmarks;
add_benchmarks<_if>("if", benchmarks, seed_type);

// Use manual timing
Expand Down
9 changes: 4 additions & 5 deletions projects/rocthrust/benchmark/bench/equal/basic.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
// SPDX-FileCopyrightText: Modifications Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved.
// SPDX-FileCopyrightText: Modifications Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

// Benchmark utils
Expand Down Expand Up @@ -100,10 +100,9 @@ void run_benchmark(benchmark::State& state,
}

template <class Benchmark>
void add_benchmarks(
const std::string& name, std::vector<benchmark::internal::Benchmark*>& benchmarks, const std::string seed_type)
void add_benchmarks(const std::string& name, std::vector<benchmark::Benchmark*>& benchmarks, const std::string seed_type)
{
std::vector<benchmark::internal::Benchmark*> bs;
std::vector<benchmark::Benchmark*> bs;
BENCHMARK_TYPE(int8_t)
BENCHMARK_TYPE(int16_t)
BENCHMARK_TYPE(int32_t)
Expand Down Expand Up @@ -131,7 +130,7 @@ int main(int argc, char* argv[])
benchmark::AddCustomContext("seed", seed_type);

// Add benchmark
std::vector<benchmark::internal::Benchmark*> benchmarks;
std::vector<benchmark::Benchmark*> benchmarks;
add_benchmarks<basic>("basic", benchmarks, seed_type);

// Use manual timing
Expand Down
Loading
Loading