Skip to content

[rocRAND] Update HIP vector accesses in rocrand - #126

Merged
umfranzw merged 1 commit into
ROCm:release-staging/rocm-rel-7.0from
umfranzw:update_hip_vec_accesses
Jun 2, 2025
Merged

umfranzw merged 1 commit into
ROCm:release-staging/rocm-rel-7.0from
umfranzw:update_hip_vec_accesses

Conversation

@umfranzw

Copy link
Copy Markdown
Contributor

Prior to HIP 7.0, individual elements of HIP vectors (eg. int2) could be accessed through the vector's data member, eg:
int2 vec; vec.data[0] = 1;

Starting with HIP 7.0, the data member is hidden, so accesses can be performed directly, like this:
int2 vec; vec[0] = 1;

This change adds a macro that checks the HIP major version number and appends a ".data" if necessary.
For example:
ROCRAND_HIPVEC_ACCESS(vec)[0] = 1;

In HIP < 7.0, this will generate:
vec.data[0] = 1;

In HIP >= 7.0, it will generate:
vec[0] = 1;

Note that this change depends on https://github.com/AMD-ROCm-Internal/clr/pull/402

Prior to HIP 7.0, individual elements of HIP vectors (eg. int2) could
be accessed through the vector's data member, eg:
int2 vec;
vec.data[0] = 1;

Starting with HIP 7.0, the data member is hidden, so accesses
can be performed directly, like this:
int2 vec;
vec[0] = 1;

This change adds a macro that checks the HIP major version number
and appends a ".data" if necessary.
For example:
ROCRAND_HIPVEC_ACCESS(vec)[0] = 1;

In HIP < 7.0, this will generate:
vec.data[0] = 1;

In HIP >= 7.0, it will generate:
vec[0] = 1;

@NguyenNhuDi NguyenNhuDi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@RobsonRLemos RobsonRLemos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@umfranzw
umfranzw merged commit c8cfad1 into ROCm:release-staging/rocm-rel-7.0 Jun 2, 2025
assistant-librarian Bot pushed a commit to ROCm/rocRAND that referenced this pull request Jun 10, 2025
[rocRAND] Update HIP vector accesses in rocrand

Prior to HIP 7.0, individual elements of HIP vectors (eg. int2) could be
accessed through the vector's data member, eg:
`int2 vec; vec.data[0] = 1;`

Starting with HIP 7.0, the data member is hidden, so accesses can be
performed directly, like this:
`int2 vec; vec[0] = 1;`

This change adds a macro that checks the HIP major version number and
appends a ".data" if necessary.
For example:
`ROCRAND_HIPVEC_ACCESS(vec)[0] = 1;`

In HIP < 7.0, this will generate:
`vec.data[0] = 1;`

In HIP >= 7.0, it will generate:
`vec[0] = 1;`

Note that this change depends on
https://github.com/AMD-ROCm-Internal/clr/pull/402
jayhawk-commits pushed a commit that referenced this pull request Jun 17, 2025
Prior to HIP 7.0, individual elements of HIP vectors (eg. int2) could be
accessed through the vector's data member, eg:
`int2 vec; vec.data[0] = 1;`

Starting with HIP 7.0, the data member is hidden, so accesses can be
performed directly, like this:
`int2 vec; vec[0] = 1;`

This change adds a macro that checks the HIP major version number and
appends a ".data" if necessary.
For example:
`ROCRAND_HIPVEC_ACCESS(vec)[0] = 1;`

In HIP < 7.0, this will generate:
`vec.data[0] = 1;`

In HIP >= 7.0, it will generate:
`vec[0] = 1;`

Note that this change depends on
https://github.com/AMD-ROCm-Internal/clr/pull/402
jayhawk-commits added a commit that referenced this pull request Jun 18, 2025
### Includes the following PRs:

- #126

Co-authored-by: Wayne Franz <wayfranz@amd.com>
eidenyoshida pushed a commit that referenced this pull request Jul 25, 2025
[rocrand] backport from release-staging-7.0

### Includes the following PRs:

- #126

Co-authored-by: Wayne Franz <wayfranz@amd.com>
ammallya pushed a commit that referenced this pull request Sep 24, 2025
* CPU ref for samples & templated epsilon

* Manual sanity check for bn infer cpu

* Rename

* BN training sample ref stub

* Change epsilon
ammallya pushed a commit that referenced this pull request Sep 24, 2025
* CPU ref for samples & templated epsilon

* Manual sanity check for bn infer cpu

* Rename

* BN training sample ref stub

* Change epsilon

[ROCm/hipDNN commit: 4d2f979]
evetsso pushed a commit to evetsso/rocm-libraries that referenced this pull request Dec 31, 2025
stanleytsang-amd pushed a commit that referenced this pull request Sep 18, 2026
stanleytsang-amd pushed a commit that referenced this pull request Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants