Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Exercises/assignment2.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ assign sched_perf.total_active_threads = perf_total_active_threads;

### Step 5: Expose the Counters in the Runtime

In the `vx_dump_perf` function in [`vortex/runtime/stub/vx_utils.cpp`](https://github.com/vortexgpgpu/vortex/blob/master/runtime/stub/vx_utils.cpp#L216), retrieve the values for `total_issued_warps` and `total_active_threads` and use them to calculate warp efficiency.
In the `vx_dump_perf` function in [`vortex/runtime/stub/utils.cpp`](https://github.com/vortexgpgpu/vortex/blob/master/runtime/stub/utils.cpp#L159), retrieve the values for `total_issued_warps` and `total_active_threads` and use them to calculate warp efficiency.

In `vx_utils.cpp`, add the following code to fetch the values from the CSR and calculate warp efficiency:
In `utils.cpp`, add the following code to fetch the values from the CSR and calculate warp efficiency:

At the end of the other counter declarations in `vx_dump_perf`, add:
```cpp
Expand All @@ -104,7 +104,7 @@ uint64_t total_issued_warps = 0;
uint64_t total_active_threads = 0;
```

Then, add a new case for VX_DCR_MPM_CLASS_3 to calculate and print per-core Warp Efficiency in [`vortex/runtime/stub/vx_utils.cpp`](https://github.com/vortexgpgpu/vortex/blob/master/runtime/stub/vx_utils.cpp#L550):
Then, add a new case for VX_DCR_MPM_CLASS_3 to calculate and print per-core Warp Efficiency in [`vortex/runtime/stub/utils.cpp`](https://github.com/vortexgpgpu/vortex/blob/master/runtime/stub/utils.cpp#L590):
```cpp
case VX_DCR_MPM_CLASS_3:
{
Expand Down Expand Up @@ -140,7 +140,7 @@ case VX_DCR_MPM_CLASS_3:
break;
```

and add the new case to calculate and print the total average Warp Efficiency of the GPU in [`vortex/runtime/stub/vx_utils.cpp`](https://github.com/vortexgpgpu/vortex/blob/master/runtime/stub/vx_utils.cpp#L630):
and add the new case to calculate and print the total average Warp Efficiency of the GPU in [`vortex/runtime/stub/utils.cpp`](https://github.com/vortexgpgpu/vortex/blob/master/runtime/stub/utils.cpp#L681):
```cpp
case VX_DCR_MPM_CLASS_3: {
uint64_t threads_per_warp;
Expand Down
2 changes: 1 addition & 1 deletion Exercises/assignment3.md
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ To test your changes, you can run the following to build and verify prefetch fun
make -s

# Test with SimX
./ci/blackbox.sh --driver=simx --cores=1 --app=prefetch --perf=1
./ci/blackbox.sh --driver=simx --cores=1 --app=prefetch --perf=3
```

The expected result is a test passed message and an output of all 3 metric counters, feel free to change `kernel.cpp` with different instruction/data sizes to observe prefetch efficiency