[rocPRIM] Avoid creating void reference type in device batch memcpy#135
Merged
umfranzw merged 1 commit intoJun 4, 2025
Merged
Conversation
In the batch_memcpy_impl struct, we define two types based on the value of the InputBufferItType template argument. 1. input_type, set to the InputBufferItType's underlying value_type's value_type. 2. Alias, a type that's set using a std::conditional statement that examines the IsMemCpy boolean template arg, and may be set to either unsigned char or the type from (1). Later code creates a reference to (1). This causes problems when (1) is void. This change removes the definition of (1), since it does not appear to be used anywhere else in our repos (it's part of the detail namespace, so it's not public). However, this is not enough to fix the problem, since the compiler evaluates both sides of the std::conditional we use to define (2). To work around this, this change also adds a helper struct type, (AliasType) that uses template specialization on the IsMemCpy boolean to define the type that Alias will be assigned. This allows us to remove the std::conditional statement.
umfranzw
commented
Jun 3, 2025
stanleytsang-amd
approved these changes
Jun 4, 2025
85a254f
into
ROCm:release-staging/rocm-rel-7.0
21 of 26 checks passed
assistant-librarian Bot
pushed a commit
to ROCm/rocPRIM
that referenced
this pull request
Jun 10, 2025
[rocPRIM] Avoid creating void reference type in device batch memcpy (#135) In the batch_memcpy_impl struct, we define two types based on the value of the InputBufferItType template argument. 1. input_type, set to the InputBufferItType's underlying value_type's value_type. 2. Alias, a type that's set using a std::conditional statement that examines the IsMemCpy boolean template arg, and may be set to either unsigned char or the type from (1). Later code creates a reference to (1). This causes problems when (1) is void. This change removes the definition of (1), since it does not appear to be used anywhere else in our repos (it's part of the detail namespace, so it's not public). However, this is not enough to fix the problem, since the compiler evaluates both sides of the std::conditional we use to define (2). To work around this, this change also adds a helper struct type, (AliasType) that uses template specialization on the IsMemCpy boolean to define the type that Alias will be assigned. This allows us to remove the std::conditional statement.
jayhawk-commits
pushed a commit
that referenced
this pull request
Jun 17, 2025
…135) In the batch_memcpy_impl struct, we define two types based on the value of the InputBufferItType template argument. 1. input_type, set to the InputBufferItType's underlying value_type's value_type. 2. Alias, a type that's set using a std::conditional statement that examines the IsMemCpy boolean template arg, and may be set to either unsigned char or the type from (1). Later code creates a reference to (1). This causes problems when (1) is void. This change removes the definition of (1), since it does not appear to be used anywhere else in our repos (it's part of the detail namespace, so it's not public). However, this is not enough to fix the problem, since the compiler evaluates both sides of the std::conditional we use to define (2). To work around this, this change also adds a helper struct type, (AliasType) that uses template specialization on the IsMemCpy boolean to define the type that Alias will be assigned. This allows us to remove the std::conditional statement.
jayhawk-commits
added a commit
that referenced
this pull request
Jun 18, 2025
### Includes the following PRs: - #76 - #77 - #78 - #90 - #135 - #150 - #192 --------- Co-authored-by: Nick Breed <78807921+NB4444@users.noreply.github.com> Co-authored-by: Sander Bos <sander@streamhpc.com> Co-authored-by: Nara Prasetya <nara@streamhpc.com> Co-authored-by: Michael Kuron <1748330+mkuron@users.noreply.github.com> Co-authored-by: Wayne Franz <wayfranz@amd.com>
ammallya
pushed a commit
that referenced
this pull request
Sep 24, 2025
* Defaulting clang-tidy checks to off during rename process * New rules * Descriptors renamed (#135) * New rules * Descriptors renamed * Formatting fixes * rename backend/src/plugin folder (#136) * rename backend/src/plugin folder * fix comments * missed 2 changes * Missed renaming shared library as part of plugins (#139) * Handle Renamed (#134) * rename handles * ignore hipdnnHandle in clang tidy * review comments * rename miopen legacy plugin engines. (#141) * Backend Rename Leftovers (#138) * Performed the rest of the backend renames * Format * PR comments * Renaming in hipdnn_frontend/attributes (#140) Update naming for our new tidy rules * renames for miopen_legacy_plugin/root (#142) * Renaming miopen legacy plugin base dir * fix missed variable and function * Rename sdk plugin (#145) * Rename Engine_config_interface * fix tests * Convert wrappers and test utils * Remaining plugin sdk renames * formatting * Apply formatting * Fix snake_case for last_erorr * Renaming in miopen legacy tests (#143) * first batch of legacy tests * tests set 2 for miopen legacy plugin * missed integration tests, fix small issues * fix * another fix * rename * Rename sdk plugin tests (#148) * Rename sdk/include/hipdnn_sdk/test_utilties symbols and usages (#146) * Rename sdk/include/hipdnn_sdk/test_utilties symbols and usages * Format * Fix test_tensor names * merge conflicts fix * format changes * format --------- Co-authored-by: Brian Harrison <brian.harrison@amd.com> * Update sdk logging names (#147) Co-authored-by: Brian Harrison <brian.harrison@amd.com> * Rename sdk test_utilities tests (#150) * Renaming complete in sdk utilities, tests, and samples. (#149) * Apply formatting * Rename frontend's backend wrappers and helpers (#152) * Renamed frontend's backend wrappers and helpers * Format * Rename backend integration tests (#153) * Rename backend integration tests * formatting * Fix missing rename variable * Renaming frontend/node and base dir (#157) * miopen plugin interface renames (#158) * /backend/tests/ rename (#156) * /backend/tests/ rename * Uncomment * Change global * Rename test plugins (#160) * Rename test plugins for the new naming scheme * Formatting * Fix accidental rename * Camel case for InitialziePlugin * Samples renamed (#159) * Renamed samples * Format * Typo and wrong casing --------- Co-authored-by: Samuel Reeder <samuel.reeder@amd.com> * Frontend integration tests renamed (#161) * Rename sdk tests utilities (#162) * Rename sdk test utilities to match new scheme * Swap to s_ instead of g_ for local static * camelCase * Replace global with test fixture (#163) * Replace global with test fixture * Change name * Rename test internals (#164) * Fix SDK tidy breaks * Backend fixes * More backend and updated clang-tidy for constexpr * Fix tidy errors * More tidy fixes for plugin, sdk, and backend * NOLINT setters and more of frontend * Fix backend tidy error * More frontend fixes * Lint free (by my reckoning) * I did this by hand * Add code style and naming doc (#165) * style doc v1 * add table of contents * fix first batch of comments * review concerns, and new section 14 * add links to style doc from other places * update both cline and copilot instructions to match (#166) * Tidy fixes (#167) * fix a few tidy issues * change tidy to * * Re-enable enum tidies * default tidy back on --------- Co-authored-by: Jeremy Hart <jeremy.hart@amd.com> * fix formatting (#168) --------- Co-authored-by: mousdahl-amd <mitch.ousdahl@amd.com> Co-authored-by: Adam Dickin <adam.dickin@amd.com> Co-authored-by: bibek <108366729+bghimireamd@users.noreply.github.com> Co-authored-by: Jeremy Hart <jeremy.hart@amd.com> Co-authored-by: BrianHarrisonAMD <169072757+BrianHarrisonAMD@users.noreply.github.com> Co-authored-by: Brian Harrison <brian.harrison@amd.com>
ammallya
pushed a commit
that referenced
this pull request
Sep 24, 2025
* Defaulting clang-tidy checks to off during rename process * New rules * Descriptors renamed (#135) * New rules * Descriptors renamed * Formatting fixes * rename backend/src/plugin folder (#136) * rename backend/src/plugin folder * fix comments * missed 2 changes * Missed renaming shared library as part of plugins (#139) * Handle Renamed (#134) * rename handles * ignore hipdnnHandle in clang tidy * review comments * rename miopen legacy plugin engines. (#141) * Backend Rename Leftovers (#138) * Performed the rest of the backend renames * Format * PR comments * Renaming in hipdnn_frontend/attributes (#140) Update naming for our new tidy rules * renames for miopen_legacy_plugin/root (#142) * Renaming miopen legacy plugin base dir * fix missed variable and function * Rename sdk plugin (#145) * Rename Engine_config_interface * fix tests * Convert wrappers and test utils * Remaining plugin sdk renames * formatting * Apply formatting * Fix snake_case for last_erorr * Renaming in miopen legacy tests (#143) * first batch of legacy tests * tests set 2 for miopen legacy plugin * missed integration tests, fix small issues * fix * another fix * rename * Rename sdk plugin tests (#148) * Rename sdk/include/hipdnn_sdk/test_utilties symbols and usages (#146) * Rename sdk/include/hipdnn_sdk/test_utilties symbols and usages * Format * Fix test_tensor names * merge conflicts fix * format changes * format --------- Co-authored-by: Brian Harrison <brian.harrison@amd.com> * Update sdk logging names (#147) Co-authored-by: Brian Harrison <brian.harrison@amd.com> * Rename sdk test_utilities tests (#150) * Renaming complete in sdk utilities, tests, and samples. (#149) * Apply formatting * Rename frontend's backend wrappers and helpers (#152) * Renamed frontend's backend wrappers and helpers * Format * Rename backend integration tests (#153) * Rename backend integration tests * formatting * Fix missing rename variable * Renaming frontend/node and base dir (#157) * miopen plugin interface renames (#158) * /backend/tests/ rename (#156) * /backend/tests/ rename * Uncomment * Change global * Rename test plugins (#160) * Rename test plugins for the new naming scheme * Formatting * Fix accidental rename * Camel case for InitialziePlugin * Samples renamed (#159) * Renamed samples * Format * Typo and wrong casing --------- Co-authored-by: Samuel Reeder <samuel.reeder@amd.com> * Frontend integration tests renamed (#161) * Rename sdk tests utilities (#162) * Rename sdk test utilities to match new scheme * Swap to s_ instead of g_ for local static * camelCase * Replace global with test fixture (#163) * Replace global with test fixture * Change name * Rename test internals (#164) * Fix SDK tidy breaks * Backend fixes * More backend and updated clang-tidy for constexpr * Fix tidy errors * More tidy fixes for plugin, sdk, and backend * NOLINT setters and more of frontend * Fix backend tidy error * More frontend fixes * Lint free (by my reckoning) * I did this by hand * Add code style and naming doc (#165) * style doc v1 * add table of contents * fix first batch of comments * review concerns, and new section 14 * add links to style doc from other places * update both cline and copilot instructions to match (#166) * Tidy fixes (#167) * fix a few tidy issues * change tidy to * * Re-enable enum tidies * default tidy back on --------- Co-authored-by: Jeremy Hart <jeremy.hart@amd.com> * fix formatting (#168) --------- Co-authored-by: mousdahl-amd <mitch.ousdahl@amd.com> Co-authored-by: Adam Dickin <adam.dickin@amd.com> Co-authored-by: bibek <108366729+bghimireamd@users.noreply.github.com> Co-authored-by: Jeremy Hart <jeremy.hart@amd.com> Co-authored-by: BrianHarrisonAMD <169072757+BrianHarrisonAMD@users.noreply.github.com> Co-authored-by: Brian Harrison <brian.harrison@amd.com> [ROCm/hipDNN commit: 839cf6c]
evetsso
pushed a commit
to evetsso/rocm-libraries
that referenced
this pull request
Dec 31, 2025
…-from-develop-082125/AMD-ROCm-Internal_hipSPARSELt/current-gfx1250-copy-081925 Merge current-gfx1250-copy-081925 into new-gfx1250-from-develop-081925
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the batch_memcpy_impl struct, we define two types based on the value of the InputBufferItType template argument.
Later code creates a reference to (1). This causes problems when (1) is void.
This change removes the definition of (1), since it does not appear to be used anywhere else in our repos (it's part of the detail namespace, so it's not public).
However, this is not enough to fix the problem, since the compiler evaluates both sides of the std::conditional we use to define (2). To work around this, this change also adds a helper struct type, (AliasType) that uses template specialization on the IsMemCpy boolean to define the type that Alias will be assigned. This allows us to remove the std::conditional statement.