Releases: ROCm/rocPRIM
rocPRIM 3.4.0 for ROCm 6.4.1
rocPRIM code for ROCm 6.4.1 did not change. The library was rebuilt for the updated ROCm 6.4.1 stack.
rocPRIM 3.4.0 for ROCm 6.4.0
Added
- Added extended tests to
rtest.py
. These tests are extra tests that did not fit the criteria of smoke and regression tests. These tests will take much longer to run relative to smoke and regression tests. - Use
python rtest.py [--emulation|-e|--test|-t]=extended
to run these tests. - Added regression tests to
rtest.py
. Regression tests are a subset of tests that caused hardware problems for past emulation environments.- Can be run with
python rtest.py [--emulation|-e|--test|-t]=regression
- Can be run with
- Added the parallel
find_first_of
device function with autotuned configurations, this function is similar tostd::find_first_of
, it searches for the first occurrence of any of the provided elements. - Added
--emulation
option added forrtest.py
- Unit tests can be run with
[--emulation|-e|--test|-t]=<test_name>
- Unit tests can be run with
- Added tuned configurations for segmented radix sort for gfx942 to improve performance on this architecture.
- Added a parallel device-level function,
rocprim::adjacent_find
, similar to the C++ Standard Librarystd::adjacent_find
algorithm. - Added configuration autotuning to device adjacent find (
rocprim::adjacent_find
) for improved performance on selected architectures. - Added rocprim::numeric_limits which is an extension of
std::numeric_limits
, which includes support for 128-bit integers. - Added rocprim::int128_t and rocprim::uint128_t which are the __int128_t and __uint128_t types.
- Added the parallel
search
andfind_end
device functions similar tostd::search
andstd::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 Librarystd::search_n
algorithm. - Added new constructors and a
base
function, and addedconstexpr
specifier to all functions inrocprim::reverse_iterator
to improve parity with the C++17std::reverse_iterator
. - Added hipGraph support to device run-length-encode for non trivial runs (
rocprim::run_length_encode_non_trivial_runs
). - Added configuration autotuning to device run-length-encode for non trivial 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
-
Changed the subset of tests that are run for smoke tests such that the smoke test will complete with faster run-time and to never exceed 2GB of vram usage. Use
python rtest.py [--emulation|-e|--test|-t]=smoke
to run these tests. -
The
rtest.py
options have changed.rtest.py
is now run with at least either--test|-t
or--emulation|-e
, but not both options. -
Changed the internal algorithm of block radix sort to use rank match to improve performance of various radix sort related algorithms.
-
Disabled padding in various cases where higher occupancy resulted in better performance despite more bank conflicts.
-
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 theCXX
variable to the path to a HIP-aware compiler.
Resolved issues
- Fixed an issue where
rmake.py
would generate wrong CMAKE commands while using Linux environment - Fixed an issue where
rocprim::partial_sort_copy
would yield a compile error if the input iterator is const. - Fixed incorrect 128-bit signed and unsigned integers type traits.
- Fixed compilation issue when
rocprim::radix_key_codec<...>
is specialized with a 128-bit integer. - Fixed the warp-level reduction
rocprim::warp_reduce.reduce
DPP implementation to avoid undefined intermediate values during the reduction. - Fixed an issue that caused a segmentation fault when
hipStreamLegacy
was passed to some API functions.
Upcoming changes
-
Using the initialisation constructor of
rocprim::reverse_iterator
will throw a deprecation warning. It will be marked as explicit in the next major release. -
Using the initialisation constructor of rocprim::reverse_iterator will throw a deprecation warning. It will be marked as explicit in the next major release.
rocPRIM 3.3.0 for ROCm 6.3.3
rocPRIM code for ROCm 6.3.3 did not change. The library was rebuilt for the updated ROCm 6.3.3 stack.
rocPRIM 3.3.0 for ROCm 6.3.2
rocPRIM code for ROCm 6.3.2 did not change. The library was rebuilt for the updated ROCm 6.3.2 stack.
rocPRIM 3.3.0 for ROCm 6.3.1
rocPRIM code for ROCm 6.3.1 did not change. The library was rebuilt for the updated ROCm 6.3.1 stack.
rocPRIM 3.3.0 for ROCm 6.3.0
Added
-
- Changed the default value of
rmake.py -a
todefault_gpus
. This is equivalent togfx906:xnack-,gfx1030,gfx1100,gfx1101,gfx1102,gfx1151,gfx1200,gfx1201
.
- Changed the default value of
- The
--test smoke
option has been added tortest.py
. Whenrtest.py
is called with this option it runs a subset of tests such that the total test time is 5 minutes. Usepython3 ./rtest.py --test smoke
orpython3 ./rtest.py -t smoke
to run the smoke test. - The
--seed
option has been added torun_benchmarks.py
. The--seed
option specifies a seed for the generation of random inputs. When the option is omitted, the default behavior is to use a random seed for each benchmark measurement. - Added configuration autotuning to device partition (
rocprim::partition
,rocprim::partition_two_way
, androcprim::partition_three_way
), to device select (rocprim::select
,rocprim::unique
, androcprim::unique_by_key
), and to device reduce by key (rocprim::reduce_by_key
) to improve performance on selected architectures. - Added
rocprim::uninitialized_array
to provide uninitialized storage in local memory for user-defined types. - Added large segment support for
rocprim:segmented_reduce
. - Added a parallel
nth_element
device function similar tostd::nth_element
.nth_element
places elements that are smaller than the nth element before the nth element, and elements that are bigger than the nth element after the nth element. - Added deterministic (bitwise reproducible) algorithm variants
rocprim::deterministic_inclusive_scan
,rocprim::deterministic_exclusive_scan
,rocprim::deterministic_inclusive_scan_by_key
,rocprim::deterministic_exclusive_scan_by_key
, androcprim::deterministic_reduce_by_key
. These provide run-to-run stable results with non-associative operators such as float operations, at the cost of reduced performance. - Added a parallel
partial_sort
andpartial_sort_copy
device functions similar tostd::partial_sort
andstd::partial_sort_copy
.partial_sort
andpartial_sort_copy
arrange elements such that the elements are in the same order as a sorted list up to and including the middle index.
Changed
- Modified the input size in device adjacent difference benchmarks. Observed performance with these benchmarks might be different.
- Changed the default seed for
device_benchmark_segmented_reduce
.
Removed
rocprim::thread_load()
androcprim::thread_store()
have been deprecated. Usedereference()
instead.
Resolved issues
- Fixed an issue in
rmake.py
where the list storing cmake options would contain individual characters instead of a full string of options. - Resolved an issue in
rtest.py
where it crashed if thebuild
folder was created withoutrelease
ordebug
subdirectories. - Resolved an issue with
rtest.py
on Windows where passing an absolute path to--install_dir
caused aFileNotFound
error. - rocPRIM functions are no longer forcefully inlined on Windows. This significantly reduces the build
time of debug builds. block_load
,block_store
,block_shuffle
,block_exchange
, andwarp_exchange
now use placementnew
instead of copy assignment (operator=
) when writing to local memory. This fixes the behavior of custom types with non-trivial copy assignments.- Fixed a bug in the generation of input data for benchmarks, which caused incorrect performance to be reported in specific cases. It may affect the reported performance for one-byte types (
uint8_t
andint8_t
) and instantiations ofcustom_type
. Specifically, device binary search, device histogram, device merge and warp sort are affected. - Fixed a bug for
rocprim::merge_path_search
where usingunsigned
offsets would produce incorrect results. - Fixed a bug for
rocprim::thread_load
androcprim::thread_store
wherefloat
anddouble
were not cast to the correct type, resulting in incorrect results. - Resolved an issue where tests where failing when they were compiled with
-D_GLIBCXX_ASSERTIONS=ON
. - Resolved an issue where algorithms that used an internal serial merge routine caused a memory access fault that resulted in potential performance drops when using block sort, device merge sort (block merge), device merge, device partial sort, and device sort (merge sort).
- Fixed memory leaks in unit tests due to missing calls to
hipFree()
and the incorrect use of hipGraphs. - Fixed an issue where certain inputs to
block_sort_merge()
,device_merge_sort_merge_path()
,device_merge()
, andwarp_sort_stable()
caused an assertion error during the call toserial_merge()
.
rocPRIM 3.2.2 for ROCm 6.2.4
Additions
- GFX1151 Support
rocPRIM 3.2.1 for ROCm 6.2.2
rocPRIM code for ROCm 6.2.2 did not change. The library was rebuilt for the updated ROCm 6.2.2 stack.
rocPRIM 3.2.1 for ROCm 6.2.1
Optimizations
- Improved performance of block_reduce_warp_reduce when warp size == block size.
rocPRIM 3.2.0 for ROCm 6.2.0
Additions
- New overloads for
warp_scan::exclusive_scan
that take no initial value. These new overloads will write an unspecified result to the first value of each warp. - The internal accumulator type of
inclusive_scan(_by_key)
andexclusive_scan(_by_key)
is now exposed as an optional type parameter.- The default accumulator type is still the value type of the input iterator (inclusive scan) or the initial value's type (exclusive scan).
This is the same behaviour as before this change.
- The default accumulator type is still the value type of the input iterator (inclusive scan) or the initial value's type (exclusive scan).
- New overload for
device_adjacent_difference_inplace
that allows separate input and output iterators, but allows them to point to the same element. - New public API for deriving resulting type on device-only functions:
rocprim::invoke_result
rocprim::invoke_result_t
rocprim::invoke_result_binary_op
rocprim::invoke_result_binary_op_t
- New
rocprim::batch_copy
function added. Similar torocprim::batch_memcpy
, but copies by element, not with memcpy. - Added more test cases, to better cover supported data types.
- Updated some tests to work with supported data types.
- An optional
decomposer
argument for all member functions ofrocprim::block_radix_sort
and all functions ofdevice_radix_sort
.
To sort keys of an user-defined type, a decomposer functor should be passed. The decomposer should produce arocprim::tuple
of references to arithmetic types from the key. - New
rocprim::predicate_iterator
which acts as a proxy for an underlying iterator based on a predicate.
It iterates over proxies that holds the references to the underlying values, but only allow reading and writing if the predicate istrue
.
It can be instantiated with:rocprim::make_predicate_iterator
rocprim::make_mask_iterator
- Added custom radix sizes as the last parameter for
block_radix_sort
. The default value is 4, it can be a number between 0 and 32. - New
rocprim::radix_key_codec
, which allows the encoding/decoding of keys for radix-based sorts. For user-defined key types, a decomposer functor should be passed.
Optimizations
- Improved the performance of
warp_sort_shuffle
andblock_sort_bitonic
. - Created an optimized version of the
warp_exchange
functionsblocked_to_striped_shuffle
andstriped_to_blocked_shuffle
when the warpsize is equal to the items per thread.
Fixes
- Fixed incorrect results of
warp_exchange::blocked_to_striped_shuffle
andwarp_exchange::striped_to_blocked_shuffle
when the block size is
larger than the logical warp size. The test suite has been updated with such cases. - Fixed incorrect results returned when calling device
unique_by_key
with overlappingvalues_input
andvalues_output
. - Fixed incorrect output type used in
device_adjacent_difference
. - Hotfix for incorrect results on the GFX10 (Navi 10/RDNA1, Navi 20/RDNA2) ISA and GFX11 ISA (Navi 30 GPUs) on device scan algorithms
rocprim::inclusive_scan(_by_key)
androcprim::exclusive_scan(_by_key)
with large input types. device_adjacent_difference
now considers both the input and the output type for selecting the appropriate kernel launch config. Previously only the input type was considered, which could result in compilation errors due to excessive shared memory usage.- Fixed incorrect data being loaded with
rocprim::thread_load
when compiling with-O0
. - Fixed a compilation failure in the host compiler when instantiating various block and device algorithms with block sizes not divisible by 64.
Deprecations
- The internal header
detail/match_result_type.hpp
has been deprecated. TwiddleIn
andTwiddleOut
have been deprecated in favor ofradix_key_codec
.- The internal
::rocprim::detail::radix_key_codec
has been deprecated in favor of the new public utility with the same name.