Commit 1c0f771
[rocm-libraries] ROCm/rocm-libraries#8142 (commit b78e456)
fix(rocthrust): fix SetBytesProcessed() calls
## Motivation
There are three spots in rocThrust that currently wrongly use
`state.SetBytesProcessed(0);`, rather than passing it an actual value.
## Technical Details
Those three spots were updated to
`state.SetBytesProcessed(state.iterations() * needles * sizeof(T));`, to
make them consistent with the
`state.SetItemsProcessed(state.iterations() * needles);` under them.
The bandwidth calculation introduced here focuses strictly on the query
footprint (`needles * sizeof(T)`) to unblock `bytes_per_second` graphing
(which currently flatlines at 0). While this represents a lower bound of
the actual global memory traffic, it provides an immediate baseline for
throughput tracking. Any future refinements to capture the exact
algorithmic memory footprint will simply scale the resulting graph by a
predictable constant factor.
## Test Plan
Run the three updated benchmarks.
## Test Result
I have confirmed they now output proper `bytes_per_second` values,
rather than:
```json
"bytes_per_second": 0.0000000000000000e+00,
"gpu_noise": 7.1034145212086564e-02,
"items_per_second": 1.6391124340294927e+07
```
## Submission Checklist
- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.1 parent cc80e9a commit 1c0f771
3 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
0 commit comments