Repository navigation
Commit bbce2d0
[rocm-libraries] ROCm/rocm-libraries#12616 (commit dda0b49)
perf(rocrand): add __restrict__ to pointers to preserve
philox4_32_10 f64 benchmark performance (#12616)
## Motivation
rocRAND device benchmark (rocrand-device) shows a ~13.35% performance
drop on MI300X (gfx942) for the normal distribution with the
philox4_32_10 engine and f64 type when comparing the WW38 staging
compiler build against the WW38 base build.
The solution is to add __restrict__ on the states and data parameters of
generate_kernel() in benchmark_device_api.hpp. This avoids LDS usage and
an increase in VGPRs for this benchmark that limits the blocksize to 128
instead of 256, resulting in uneven work distribution.
JIRA ID : AIPRIMS-262
## Technical Details
Adds __restrict__ on the states and data parameters of generate_kernel()
in benchmark_device_api.hpp.
## Test Plan
Unit tests pass with no performance regressions.
## Test Result
Unit tests pass with no performance regressions.
## Submission Checklist
- [ ] Look over the contributing guidelines at
https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.1 parent cb02279 commit bbce2d0
3 files changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
| 338 | + | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
| 400 | + | |
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
590 | | - | |
| 590 | + | |
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
| |||
0 commit comments