Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
1a3b14a
Avoid evaluating CMake LINK_LANGUAGE generator expressions in CMake <…
umfranzw Jan 16, 2025
25f3387
Fix Windows CMake link issue (#675)
umfranzw Jan 21, 2025
4903d4a
Resolve "Add hipGraph compatibility for device run length encode"
Beanavil Nov 21, 2024
29970bf
Resolve "Investigate RLE (non trivial runs) failure"
Beanavil Nov 21, 2024
cfeb4a4
Resolve "Config tuning and dynamic dispatch for device run length enc…
yungshengtu Nov 21, 2024
d3aa223
Resolve "Implement type traits interface for rocPRIM's compiler-exten…
cenxuantian Nov 21, 2024
b9c8502
remove ordered block id from run length encode
Snektron Nov 21, 2024
2e8622f
MI200 & MI300 tuning
Snektron Dec 17, 2024
b60bbab
Optimizations for MI300 unique performance
Snektron Jan 16, 2025
84c6d8d
improve type traits interface docs
Snektron Jan 20, 2025
4bcdd4b
Fix static asserts and remove template specialization
jblok27 Nov 21, 2024
19bd48a
Fix tests triggering static asserts
jblok27 Nov 21, 2024
a4769a7
Fix benchmarks triggering static asserts
jblok27 Nov 21, 2024
b11414d
Set explicit return types
jblok27 Nov 21, 2024
70a321a
Resolve "Investigate RLE (non trivial runs) failure"
Beanavil Nov 21, 2024
b6c63e8
Revert "Fix benchmarks triggering static asserts"
jblok27 Nov 21, 2024
c1f2fc4
Revert "Fix tests triggering static asserts"
jblok27 Nov 21, 2024
13aeb1d
Revert "Fix static asserts and remove template specialization"
jblok27 Nov 21, 2024
098b500
Fix formatting and copyright date
jblok27 Nov 21, 2024
6fd035e
Temp fix: histogram dynamic memory failure on windows
NB4444 Nov 21, 2024
8a48698
add ROCPRIM_ENABLE_ASSERTS to cmake to enable asserts in release build
parbenc Nov 21, 2024
96d09c5
Add missing docs for `block_run_length_decode`
MyNameIsTrez Nov 21, 2024
85aaa4e
Resolve "Add documentation and test for out-of-range behaviour on mer…
parbenc Nov 21, 2024
ccfb3a8
Resolve "Replace __launch_bounds__ with ROCPRIM_LAUNCH_BOUNDS in rocP…
cenxuantian Nov 21, 2024
33e447e
Update rmake.py copyright
Beanavil Nov 21, 2024
f64016c
fix double buffers in device radix sort
Naraenda Nov 26, 2024
326716b
Resolve "Replace hipMalloc, hipMallocHelper, and hipFree in tests wit…
cenxuantian Nov 27, 2024
4aa1ca5
fix device adjacent difference tuning benchmark
ex-rzr Nov 29, 2024
9cf8ca9
Fix warp dpp reduction
Beanavil Nov 29, 2024
7e81f1e
Fix static assertion for int128 in ONNX Runtime with GNU extensions
ex-rzr Nov 29, 2024
0e572d2
fix GenerateResourceSpec for gfx90a
Snektron Dec 2, 2024
0654d1a
Resolve "ROCPRIM_TARGET_ARCH deprecation"
parbenc Dec 2, 2024
be04730
Fix warnings when generating sphinx docs
MyNameIsTrez Dec 2, 2024
3cf1ea0
Performance improvements with shuffled warp exchange
Dec 5, 2024
ce92984
log more information during configure
Naraenda Dec 5, 2024
bac2c82
Update documentation generation instructions
MyNameIsTrez Dec 9, 2024
6d3f6f1
Resolve "Replace hipMalloc, hipMallocHelper, and hipFree in benchmark…
cenxuantian Dec 10, 2024
b3d59dc
Resolve "search_n optimization"
cenxuantian Dec 10, 2024
c846643
CI changes to speedup development
NB4444 Dec 11, 2024
e4b3c54
Remove select_arch and select_arch_case
MyNameIsTrez Dec 10, 2024
bb5a0b5
fix missing equality operator and function constness
Naraenda Dec 13, 2024
b25ca66
Print arguments and timing info in `batch_memcpy_func` when `debug_sy…
MyNameIsTrez Dec 13, 2024
9ca7105
Resolve "Replace hipMalloc, hipMallocHelper, and hipFree in benchmark…
cenxuantian Dec 16, 2024
4d8aac5
Resolve "Replace hipMalloc, hipMallocHelper, and hipFree in benchmark…
cenxuantian Dec 16, 2024
f6d0082
Resolve "Replace hipMalloc, hipMallocHelper, and hipFree in benchmark…
cenxuantian Dec 17, 2024
8b7a36e
Fix rules overwrite for other then MR pipelines
NB4444 Dec 17, 2024
8d73701
Resolve "Add stream, memset, array, and unique_ptr support to device_…
cenxuantian Dec 17, 2024
b3b6497
Resolve "Reduce amount of test runs based on environment variable."
NB4444 Dec 18, 2024
57e268a
Resolve "Get clarity on skipping of adjacent difference tests"
Saiyang-Zhang Dec 18, 2024
f29ab0d
Remove windows CI check
NB4444 Dec 17, 2024
fe76c50
Resolve "Add UnrolledThreadLoad and UnrolledThreadCopy functions"
NB4444 Dec 18, 2024
eba0af4
Resolve "General changes CCCL 2.6"
NB4444 Dec 20, 2024
55f4df5
Reduce CI artifact retention time
Snektron Dec 20, 2024
7414e03
Resolve "Add thread_load_volatile_pointer to rocprim"
NB4444 Dec 20, 2024
a8cbe5c
Fix test:install on rocm/dev-ubuntu
ex-rzr Dec 30, 2024
337797c
Resolve "Nth element - Investigate smaller index sizes where possible"
Saiyang-Zhang Jan 3, 2025
b57e163
Enable int128 tests on Windows
ex-rzr Jan 3, 2025
9911f17
Resolve "Benchmark and tuning for 128-bit integers"
yungshengtu Jan 3, 2025
2f140cb
Resolve "Verify sorting on device"
cenxuantian Jan 6, 2025
d8101b4
Resolve "Expose lookback_scan_state::create and lookback_scan_state::…
cenxuantian Jan 6, 2025
b80bba6
add naive in-place api for device merge
Naraenda Jan 9, 2025
1189d00
To remove error in CI change it to AMDGPU_TARGETS
NB4444 Jan 9, 2025
e3b35ce
fix device_ptr assign move and void types
Naraenda Jan 13, 2025
d4a7092
Resolve "Add block- and warp-level inclusive_scan with initial value …
Beanavil Jan 13, 2025
ae1ce56
Fix C++ includes showing up in the docs
MyNameIsTrez Jan 13, 2025
9995fa4
Resolve "Performance regressions during tuning: Adjacent find"
NB4444 Jan 14, 2025
42b5518
CI skip label fix
NB4444 Jan 10, 2025
2764058
fix doxygen warning in merge.rst
Naraenda Jan 15, 2025
2add4a3
Resolve "Autotuning for segmented reduce"
EnricoDeg Jan 15, 2025
e0617cb
Resolve "Update thread_store for parity"
NB4444 Jan 15, 2025
0c36f82
Resolve "Fix compile errors in "rocprim-release-tune" mode"
cenxuantian Jan 16, 2025
bc6605b
Documentation to CI upload
borysborys Jan 16, 2025
bf8985d
Resolve "Remove ASM from thread_load and thread_store"
NB4444 Jan 17, 2025
2d96209
Add documentation steps to developer guidelines
MyNameIsTrez Jan 17, 2025
033ced9
Resolve "Refactor lookback_scan_state API"
cenxuantian Jan 17, 2025
a7dec4b
Adopt symbol visibility rules in rocPRIM
ex-rzr Jan 17, 2025
b38f541
remove nm debug messages from cmake
Snektron Jan 20, 2025
44d19af
Remove extra dashes in the documentation its \param and \tparam
MyNameIsTrez Jan 20, 2025
0b2f462
update changelog
Snektron Jan 24, 2025
bc8ae44
fix(test_device_merge_inplace.cpp): prevent merge inplace tests to te…
Naraenda Jan 24, 2025
6ba76f6
Fix test_linking: install the test's libraries too
ex-rzr Jan 24, 2025
65c355d
chore(rmake.py): bump copyright
Naraenda Feb 12, 2025
c1e9924
fix(example_type_traits_interface.cpp): explicit return from main
Naraenda Feb 12, 2025
72e1ff7
Fix unintentionally exported shared libs of test_linking
ex-rzr Feb 25, 2025
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
  •  
  •  
  •  
72 changes: 55 additions & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
#
# Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All rights reserved.
# Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -42,6 +42,17 @@ stages:
- test
- benchmark

workflow:
rules:
- if: $CI_MERGE_REQUEST_LABELS =~ /CI Skip/
when: never
- if: $CI_MERGE_REQUEST_TITLE !~ /Draft:/
variables:
ROCPRIM_TEST_RUNS: 3
- if: $CI_MERGE_REQUEST_TITLE =~ /Draft:/
variables:
ROCPRIM_TEST_RUNS: 1

variables:
PACKAGE_DIR: $BUILD_DIR/package
AUTOTUNE_CONFIG_DIR: ${CI_PROJECT_DIR}/autotune_config
Expand Down Expand Up @@ -110,8 +121,7 @@ copyright-date:
-D BUILD_TEST=ON
-D BUILD_EXAMPLE=ON
-D BUILD_BENCHMARK=ON
-D GPU_TARGETS=$GPU_TARGETS
-D AMDGPU_TEST_TARGETS=$GPU_TARGETS
-D AMDGPU_TARGETS=$GPU_TARGETS
-D CMAKE_C_COMPILER_LAUNCHER=phc_sccache_c
-D CMAKE_CXX_COMPILER_LAUNCHER=phc_sccache_cxx
-D CMAKE_CXX_STANDARD=14
Expand Down Expand Up @@ -170,7 +180,7 @@ build:cmake-minimum-apt:
- | # Add hardened libc++ assertions for tests only
if [[ $BUILD_TARGET == "TEST" ]]; then
echo "Configuring with hardened libc++!"
EXTRA_CMAKE_CXX_FLAGS+=" -D_GLIBCXX_ASSERTIONS=ON"
EXTRA_CMAKE_CXX_FLAGS+=" -D_GLIBCXX_ASSERTIONS=ON -D ROCPRIM_ENABLE_ASSERTS=ON"
fi
- cmake
-G Ninja
Expand All @@ -181,8 +191,7 @@ build:cmake-minimum-apt:
-D CMAKE_C_COMPILER_LAUNCHER=phc_sccache_c
-D CMAKE_CXX_COMPILER_LAUNCHER=phc_sccache_cxx
-D BUILD_EXAMPLE=ON
-D GPU_TARGETS=$GPU_TARGETS
-D AMDGPU_TEST_TARGETS=$GPU_TARGETS
-D AMDGPU_TARGETS=$GPU_TARGETS
-D CMAKE_CXX_STANDARD="$BUILD_VERSION"
-S $CI_PROJECT_DIR
-B $BUILD_DIR
Expand All @@ -198,8 +207,9 @@ build:cmake-minimum-apt:
- $BUILD_DIR/test/CTestTestfile.cmake
- $BUILD_DIR/test/rocprim/CTestTestfile.cmake
- $BUILD_DIR/test/rocprim/test_*
- $BUILD_DIR/test/rocprim/libtest_*
- $BUILD_DIR/test/test_*
expire_in: 2 weeks
expire_in: 1 day

build:cmake-latest:
stage: build
Expand Down Expand Up @@ -249,7 +259,7 @@ build:package:
paths:
- $PACKAGE_DIR/rocprim*.deb
- $PACKAGE_DIR/rocprim*.zip
expire_in: 2 weeks
expire_in: 1 day

build:windows:
stage: build
Expand All @@ -269,7 +279,7 @@ build:windows:
-S $CI_PROJECT_DIR
-B $CI_PROJECT_DIR/build
-D BUILD_$BUILD_TARGET=ON
-D GPU_TARGETS=$GPU_TARGET
-D AMDGPU_TARGETS=$GPU_TARGET
-D CMAKE_CXX_COMPILER:PATH="${env:HIP_PATH}\bin\clang++.exe"
-D CMAKE_PREFIX_PATH:PATH="${env:HIP_PATH}"
-D CMAKE_BUILD_TYPE="$BUILD_TYPE"
Expand All @@ -285,7 +295,7 @@ build:windows:
- $CI_PROJECT_DIR/build/CMakeCache.txt
- $CI_PROJECT_DIR/build/.ninja_log
- $CI_PROJECT_DIR/build/CTestTestfile.cmake
expire_in: 2 weeks
expire_in: 1 day

autotune:build:
stage: autotune
Expand Down Expand Up @@ -317,7 +327,7 @@ autotune:build:
-D BUILD_EXAMPLE=OFF
-D BUILD_BENCHMARK=ON
-D BENCHMARK_CONFIG_TUNING=ON
-D GPU_TARGETS=$GPU_TARGETS
-D AMDGPU_TARGETS=$GPU_TARGETS
-D CMAKE_C_COMPILER_LAUNCHER=phc_sccache_c
-D CMAKE_CXX_COMPILER_LAUNCHER=phc_sccache_cxx
-D CMAKE_CXX_STANDARD=14
Expand All @@ -334,12 +344,13 @@ autotune:build:
- $BUILD_DIR/deps/googlebenchmark/
expire_in: 1 week

test:
.test:common:
stage: test
tags:
- rocm
- $GPU
extends:
- .cmake-minimum
- .rules:test
- .gpus:rocm
needs:
- job: build:cmake-minimum
parallel:
Expand All @@ -359,10 +370,32 @@ test:
- HSA_ENABLE_SDMA=0 ctest
--output-on-failure
--repeat-until-fail 2
--tests-regex "hip|$GPU_TARGET"
--resource-spec-file ./resources.json
--parallel $PARALLEL_JOBS

test:any-gpu:
variables:
GPU: ""
PARALLEL_JOBS: 1
extends:
- .test:common
rules:
- if: $CI_MERGE_REQUEST_TITLE =~ /Draft:/ && $CI_MERGE_REQUEST_LABELS !~ /Arch::/

test:label-arch:
extends:
- .gpus:rocm
- .test:common
- .rules:arch-labels

test:all-gpus:
variables:
SHOULD_BE_UNDRAFTED: "true"
extends:
- .gpus:rocm
- .test:common
- .rules:test

.test-windows-base:
stage: test
extends:
Expand Down Expand Up @@ -402,7 +435,7 @@ test-windows-release:
-G Ninja
-D CMAKE_CXX_COMPILER="$AMDCLANG"
-D CMAKE_BUILD_TYPE=Release
-D GPU_TARGETS=$GPU_TARGETS
-D AMDGPU_TARGETS=$GPU_TARGETS
-D CMAKE_CXX_STANDARD=14
-S "$CI_PROJECT_DIR/test/extra"
-B "$CI_PROJECT_DIR/package_test"
Expand All @@ -428,7 +461,8 @@ test:install:
-D CMAKE_CXX_STANDARD=14
-B build
-S $CI_PROJECT_DIR
- $SUDO_CMD cmake --build build --target install
# Preserve $PATH when sudoing
- $SUDO_CMD env PATH="$PATH" cmake --build build --target install
- !reference [.test-package, script]

test:deb:
Expand All @@ -452,6 +486,10 @@ test:docs:
extends:
- .rules:test
- .build:docs
artifacts:
paths:
- $DOCS_DIR/_build/html/
expire_in: 2 weeks

.benchmark-base:
stage: benchmark
Expand Down
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,30 @@ Full documentation for rocPRIM is available at [https://rocm.docs.amd.com/projec
## rocPRIM 3.5.0 for ROCm 6.5.0

### Added
* gfx950 support

* Added gfx950 support.
* Added `rocprim::key_value_pair::operator==`.
* Added the `rocprim::unrolled_copy` thread function to copy multiple items inside a thread.
* Added the `rocprim::unrolled_thread_load` function to load multiple items inside a thread using `rocprim::thread_load`.
* Added `rocprim::int128_t` and `rocprim::uint128_t` to benchmarks for improved performance evaluation on 128-bit integers.
* Added `rocprim::int128_t` to the supported autotuning types to improve performance for 128-bit integers.
* Added the `rocprim::merge_inplace` function for merging in-place.
* Added initial value support for warp- and block-level inclusive scan.

### Changed

* A new version of `rocprim::thread_load` and `rocprim::thread_store` replace the deprecated `rocprim::thread_load` and `rocprim::thread_store` functions. The versions avoid inline assembly where possible, and don't hinder the optimizer as much as a result.
* Renamed `rocprim::load_cs` to `rocprim::load_nontemporal` and `rocprim::store_cs` to `rocprim::store_nontemporal` to express the intent of these load and store methods better.
* All kernels now have hidden symbol visibility. All symbols now have inline namespaces that include the library version, for example, `rocprim::ROCPRIM_300400_NS::symbol` instead of `rocPRIM::symbol`, letting the user link multiple libraries built with different versions of rocPRIM.

Comment thread
spolifroni-amd marked this conversation as resolved.
Resolved
### Resolved issues

* Fixed device radix sort not returning the correct required temporary storage when a double buffer contains `nullptr`.
* Fixed constness of equality operators (`==` and `!=`) in `rocprim::key_value_pair`.

### Deprecations

* `rocprim::load_cs` and `rocprim::store_cs` are deprecated. Use `rocprim::load_nontemporal` and `rocprim::store_nontemporal` now.

## rocPRIM 3.4.0 for ROCm 6.4.0

Expand All @@ -26,6 +49,10 @@ Full documentation for rocPRIM is available at [https://rocm.docs.amd.com/projec
* Added the parallel `search` and `find_end` device functions similar to `std::search` and `std::find_end`, these functions search for the first and last occurrence of the sequence respectively.
* Added a parallel device-level function, `rocprim::search_n`, similar to the C++ Standard Library `std::search_n` algorithm.
* Added new constructors and a `base` function, and added `constexpr` specifier to all functions in `rocprim::reverse_iterator` to improve parity with the C++17 `std::reverse_iterator`.
* Added hipGraph support to device run-length-encode for nontrivial runs (`rocprim::run_length_encode_non_trivial_runs`).
* Added configuration autotuning to device run-length-encode for nontrivial runs (`rocprim::run_length_encode_non_trivial_runs`) for improved performance on selected architectures.
* Added configuration autotuning to device run-length-encode for trivial runs (`rocprim::run_length_encode`) for improved performance on selected architectures.
* Added a new type traits interface to enable users to provide additional type trait information to rocPRIM, facilitating better compatibility with custom types.

### Changed

Expand All @@ -36,6 +63,7 @@ Full documentation for rocPRIM is available at [https://rocm.docs.amd.com/projec

* Removed HIP-CPU support. HIP-CPU support was experimental and broken.
* Changed the C++ version from 14 to 17. C++14 will be deprecated in the next major release.
* You can use CMake HIP language support with CMake 3.18 and later. To use HIP language support, run `cmake` with `-DUSE_HIPCXX=ON` instead of setting the `CXX` variable to the path to a HIP-aware compiler.

### Resolved issues

Expand Down
19 changes: 18 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
#
# Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All rights reserved.
# Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -74,6 +74,7 @@ option(BUILD_NAIVE_BENCHMARK "Build naive benchmarks" OFF)
cmake_dependent_option(BUILD_DOCS "Build documentation (requires sphinx)" OFF "NOT ONLY_INSTALL" OFF)
option(BUILD_CODE_COVERAGE "Build with code coverage enabled" OFF)
option(ROCPRIM_INSTALL "Enable installation of rocPRIM (projects embedding rocPRIM may want to turn this OFF)" ON)
option(ROCPRIM_ENABLE_ASSERTS "Enable asserts in release build)" OFF)

check_language(HIP)
cmake_dependent_option(USE_HIPCXX "Use CMake HIP language support" OFF CMAKE_HIP_COMPILER OFF)
Expand Down Expand Up @@ -104,6 +105,21 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "" "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

if(ROCPRIM_ENABLE_ASSERTS)
if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "")
string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE)
set(BUILD_TYPE_CXX_FLAGS "CMAKE_CXX_FLAGS_${BUILD_TYPE}")
set(BUILD_TYPE_C_FLAGS "CMAKE_C_FLAGS_${BUILD_TYPE}")
endif()

string(REGEX REPLACE "-DNDEBUG( |$)" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE "-DNDEBUG( |$)" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "")
string(REGEX REPLACE "-DNDEBUG( |$)" "" ${BUILD_TYPE_CXX_FLAGS} "${${BUILD_TYPE_CXX_FLAGS}}")
string(REGEX REPLACE "-DNDEBUG( |$)" "" ${BUILD_TYPE_C_FLAGS} "${${BUILD_TYPE_C_FLAGS}}")
endif()
endif()

set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "Add paths to linker search and installed rpath")

if(DEFINED BUILD_SHARED_LIBS)
Expand Down Expand Up @@ -167,6 +183,7 @@ endif()
# Setup VERSION
set(VERSION_STRING "3.4.0")
rocm_setup_version(VERSION ${VERSION_STRING})
math(EXPR rocprim_VERSION_NUMBER "${rocprim_VERSION_MAJOR} * 100000 + ${rocprim_VERSION_MINOR} * 100 + ${rocprim_VERSION_PATCH}")

# Print configuration summary
include(cmake/Summary.cmake)
Expand Down
Loading