Repository navigation
Develop stream 2025-01-23 - #678
Conversation
spolifroni-amd
left a comment
There was a problem hiding this comment.
Small changes needed to the changelog.
|
Thanks for the quick review, @spolifroni-amd, your work is appreciated :) I'll update the pull request tomorrow. |
|
Applied the suggestions |
e6cb034 to
5149685
Compare
d9ffa89 to
25c571f
Compare
|
There's a CI test failure for test_device_merge_inplace on gfx942. I'm able to reproduce it, and I'm trying to narrow things down. It looks like the failure happens for the largest test size used in the DeviceMergeInPlace test case: |
@Naraenda I ran some experiments, and it looks like if I allocate 2^35 total bytes, everything runs fine, but if I allocate 2^36 the process gets killed. I believe if you modify your existing check in ae4709f to look at |
umfranzw
left a comment
There was a problem hiding this comment.
I think this looks good - I just found a few small things I wanted to mention.
25c571f to
a5361e7
Compare
I've updated the commit that introduced this: 46a1f80 |
umfranzw
left a comment
There was a problem hiding this comment.
I think this looks ready to go.
281a187 to
a5361e7
Compare
…3.18 (ROCm#667) Recently, we added CMake HIP Language support. That change introduced generator expressions that use the LINK_LANGUAGE keyword. This keyword is only supported in CMake 3.18+. The minimum CMake version we require is 3.16. As a result, if you built with CMake 3.16 - 3.18, you'd get a build failure. This change adds checks around all the spots where the LINK_LANGUAGE keyword is used to avoid this problem. It also adds a description of the CMake HIP Language support to the changelog (previously overlooked).
A recent cmake change added a condition check that avoids evaluating a LINK_LANGUAGE generator expression if HIP_USECXX is OFF (since LINK_LANGUAGE is unsupported in CMake < 3.18). However, it didn't account for the fact that the LINK_LANGUAGE expression is embedded in a conditional generator expression. This change adds an "else" block that ensures the "false" side of the conditional generator expression is still evaluated when the LINK_LANGUAGE code is skipped. This fixes some build issues on Windows. Also updates the readme to include recent changes to the way projects must link to rocPRIM.
…ded types and third-party's types"
A missing call to __syncthreads() caused this algorithm to occasionally produce an invalid index and cause a crash. Instead of just adding that call, we can remove the use of ordered block id by the regular block id, which is already ordered per HSA guarantees. There still remains an issue with a hang, but this seems a runtime issue and will be investigated separately.
…get_storage_size as ROCPRIM_HOST_DEVICE."
…sts to grow too big
a5361e7 to
c1e9924
Compare
|
I resolved the merge conflicts. |
rocm_install adds all libraries to ${PROJECT_NAME_LOWER}-targets
(i.e. rocprim-targets.cmake) unless a custom export file is specified.
* Avoid evaluating CMake LINK_LANGUAGE generator expressions in CMake <3.18 (#667) Recently, we added CMake HIP Language support. That change introduced generator expressions that use the LINK_LANGUAGE keyword. This keyword is only supported in CMake 3.18+. The minimum CMake version we require is 3.16. As a result, if you built with CMake 3.16 - 3.18, you'd get a build failure. This change adds checks around all the spots where the LINK_LANGUAGE keyword is used to avoid this problem. It also adds a description of the CMake HIP Language support to the changelog (previously overlooked). * Fix Windows CMake link issue (#675) A recent cmake change added a condition check that avoids evaluating a LINK_LANGUAGE generator expression if HIP_USECXX is OFF (since LINK_LANGUAGE is unsupported in CMake < 3.18). However, it didn't account for the fact that the LINK_LANGUAGE expression is embedded in a conditional generator expression. This change adds an "else" block that ensures the "false" side of the conditional generator expression is still evaluated when the LINK_LANGUAGE code is skipped. This fixes some build issues on Windows. Also updates the readme to include recent changes to the way projects must link to rocPRIM. * Resolve "Add hipGraph compatibility for device run length encode" * Resolve "Investigate RLE (non trivial runs) failure" * Resolve "Config tuning and dynamic dispatch for device run length encode" * Resolve "Implement type traits interface for rocPRIM's compiler-extended types and third-party's types" * remove ordered block id from run length encode A missing call to __syncthreads() caused this algorithm to occasionally produce an invalid index and cause a crash. Instead of just adding that call, we can remove the use of ordered block id by the regular block id, which is already ordered per HSA guarantees. There still remains an issue with a hang, but this seems a runtime issue and will be investigated separately. * MI200 & MI300 tuning * Optimizations for MI300 unique performance * improve type traits interface docs * Fix static asserts and remove template specialization * Fix tests triggering static asserts * Fix benchmarks triggering static asserts * Set explicit return types * Resolve "Investigate RLE (non trivial runs) failure" * Revert "Fix benchmarks triggering static asserts" This reverts commit a1634a9. * Revert "Fix tests triggering static asserts" This reverts commit 24a36cb. * Revert "Fix static asserts and remove template specialization" This reverts commit b2089ee. * Fix formatting and copyright date * Temp fix: histogram dynamic memory failure on windows * add ROCPRIM_ENABLE_ASSERTS to cmake to enable asserts in release build set ROCPRIM_ENABLE_ASSERTS for CI tests * Add missing docs for `block_run_length_decode` * Resolve "Add documentation and test for out-of-range behaviour on merge path search" add test for out of bounds diagonal test for rocprim::merge_path_search document behaviour for out of bounds diagonal test for rocprim::merge_path_search * Resolve "Replace __launch_bounds__ with ROCPRIM_LAUNCH_BOUNDS in rocPRIM API" * Update rmake.py copyright * fix double buffers in device radix sort * Resolve "Replace hipMalloc, hipMallocHelper, and hipFree in tests with device_ptr" * fix device adjacent difference tuning benchmark * Fix warp dpp reduction * Fix static assertion for int128 in ONNX Runtime with GNU extensions * fix GenerateResourceSpec for gfx90a * Resolve "ROCPRIM_TARGET_ARCH deprecation" * Fix warnings when generating sphinx docs * Performance improvements with shuffled warp exchange * log more information during configure * Update documentation generation instructions * Resolve "Replace hipMalloc, hipMallocHelper, and hipFree in benchmarks and tests with device_ptr" Part 4 * Resolve "search_n optimization" * CI changes to speedup development * Remove select_arch and select_arch_case * fix missing equality operator and function constness * Print arguments and timing info in `batch_memcpy_func` when `debug_synchronous` is true * Resolve "Replace hipMalloc, hipMallocHelper, and hipFree in benchmarks and tests with device_ptr" Part 3 * Resolve "Replace hipMalloc, hipMallocHelper, and hipFree in benchmarks and tests with device_ptr" Part 1 * Resolve "Replace hipMalloc, hipMallocHelper, and hipFree in benchmarks and tests with device_ptr" Part 2 * Fix rules overwrite for other then MR pipelines * Resolve "Add stream, memset, array, and unique_ptr support to device_ptr" * Resolve "Reduce amount of test runs based on environment variable." * Resolve "Get clarity on skipping of adjacent difference tests" * Remove windows CI check * Resolve "Add UnrolledThreadLoad and UnrolledThreadCopy functions" * Resolve "General changes CCCL 2.6" * Reduce CI artifact retention time * Resolve "Add thread_load_volatile_pointer to rocprim" * Fix test:install on rocm/dev-ubuntu * Resolve "Nth element - Investigate smaller index sizes where possible" * Enable int128 tests on Windows * Resolve "Benchmark and tuning for 128-bit integers" * Resolve "Verify sorting on device" * Resolve "Expose lookback_scan_state::create and lookback_scan_state::get_storage_size as ROCPRIM_HOST_DEVICE." * add naive in-place api for device merge * To remove error in CI change it to AMDGPU_TARGETS * fix device_ptr assign move and void types * Resolve "Add block- and warp-level inclusive_scan with initial value support" * Fix C++ includes showing up in the docs * Resolve "Performance regressions during tuning: Adjacent find" * CI skip label fix * fix doxygen warning in merge.rst * Resolve "Autotuning for segmented reduce" * Resolve "Update thread_store for parity" * Resolve "Fix compile errors in "rocprim-release-tune" mode" * Documentation to CI upload * Resolve "Remove ASM from thread_load and thread_store" * Add documentation steps to developer guidelines * Resolve "Refactor lookback_scan_state API" * Adopt symbol visibility rules in rocPRIM * remove nm debug messages from cmake * Remove extra dashes in the documentation its \param and \tparam * update changelog * fix(test_device_merge_inplace.cpp): prevent merge inplace tests to tests to grow too big * Fix test_linking: install the test's libraries too * chore(rmake.py): bump copyright * fix(example_type_traits_interface.cpp): explicit return from main * Fix unintentionally exported shared libs of test_linking rocm_install adds all libraries to ${PROJECT_NAME_LOWER}-targets (i.e. rocprim-targets.cmake) unless a custom export file is specified. --------- Co-authored-by: Wayne Franz <wayfranz@amd.com> Co-authored-by: Beatriz Navidad Vilches <beatriz@streamhpc.com> Co-authored-by: Yung-sheng Tu <yung-sheng@streamhpc.com> Co-authored-by: Cenxuan Tian <cenxuan@streamhpc.com> Co-authored-by: Jaap Blok <jaap@streamhpc.com> Co-authored-by: Nick Breed <nick@streamhpc.com> Co-authored-by: Bence Parajdi <bence@streamhpc.com> Co-authored-by: Sander Bos <sander@streamhpc.com> Co-authored-by: Nara Prasetya <nara@streamhpc.com> Co-authored-by: Anton Gorenko <anton@streamhpc.com> Co-authored-by: Milo Lurati <milo@streamhpc.com> Co-authored-by: Saiyang Zhang <saiyang@streamhpc.com> Co-authored-by: Enrico Degregori <enrico@streamhpc.com> Co-authored-by: Borys Petrov <borys@streamhpc.com> [ROCm/rocPRIM commit: 678701d]
This pull request is based on top of #674, that one should be merged first.
This pull request contains our changes from the past few months. A summary of the most notable changes:
UnrolledThreadLoadandUnrolledThreadCopyROCPRIM_TARGET_ARCH, which allowed users to specialize rocPRIM for a particular architecture. This is now mostly resolved by the newROCPRIM_TARGET_(CDNA3|CDNA2|CDNA1|RDNA3|RDNA2|RNDA1|GCN5)macros, which are automatically determined from the (device) compilation target. This does not affect any downstream user code, but does affect rocThrust a little bit.rocprim::thread_loadandrocprim::thread_store. Most of the inline assembly has been removed, which should make the compiler able to optimize these operations better. These functions allow programmers to load memory more efficiently by providing hints for how memory will be used, for example,rocprim::thread_load<rocprim::load_nontemporal /* previously: rocprim::load_cs */>(ptr)can be used effectively to improve memory throughput on MI300.rocprim::merge_inplace. This algorithm is likerocprim::merge, but (as the name suggests) can operate in-place. Whilerocprim::mergeis usually faster, this algorithm can be used when not enough memory is available for an out-of-place buffer.