feat(primbench): support an extra backend#5512
Draft
MyNameIsTrez wants to merge 16 commits intodevelopfrom
Draft
feat(primbench): support an extra backend#5512MyNameIsTrez wants to merge 16 commits intodevelopfrom
MyNameIsTrez wants to merge 16 commits intodevelopfrom
Conversation
58d791c to
4743f41
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (77.21%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #5512 +/- ##
===========================================
- Coverage 66.57% 64.27% -2.29%
===========================================
Files 1836 1988 +152
Lines 282885 308555 +25670
Branches 39734 40299 +565
===========================================
+ Hits 188308 198317 +10009
- Misses 78211 93495 +15284
- Partials 16366 16743 +377
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
8a8c064 to
51b7779
Compare
…compute_max_specialization_width()
51b7779 to
3e9ed1b
Compare
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.
Motivation
The PR feat(rocrand): use primbench requires primbench to support CUDA, since rocRAND contains cuRAND benchmarks.
Technical Details
I've spent a few hours on cleaning up the commit history. I recommend reviewing this PR by clicking on the first commit in the Commits tab, and then clicking the
Nextbutton to scroll through the commits chronologically.The first commit is
feat(primbench): support CUDAand is by far the largest and most complex, so I recommend reviewing the other commits first since they're nice and small.The
feat(primbench): support vector CLI argscommit was also required for rocRAND, since its benchmarks accept an array of values:--lambda 1 2 3.Two flags were removed
Even though this PR adds CUDA support to
primbench.hpp, it went down from 4075 lines to 3593 lines. This is mostly the result of me deciding to remove the flags--output-hip-device-properties-contextand--output-amdsmi-context.These flags were used to dump an extreme amount of extra context to the JSON output, but I have not actually found the extra context useful even once while updating all 53 rocPRIM benchmarks to use primbench.
Porting these flags to CUDA would have been a nightmare, and removing these two flags has made the library significantly more maintainable. In the future we might decide to output a few of the most useful context fields to the JSON output again.
Test Plan
VS Code dev containers
CUDA
Dockerfile+devcontainer.jsonDockerfile:devcontainer.json:{ "build": { "dockerfile": "Dockerfile" }, "name": "cuda-minimal", "privileged": true, "runArgs": [ "--gpus=all" ] }HIP
Dockerfile+devcontainer.jsonDockerfile:FROM rocm/rocm-terminal:latestdevcontainer.json:{ "build": { "dockerfile": "Dockerfile" }, "name": "hip-minimal", "privileged": true }Setup
Running the CUDA example benchmark
nvcc -o copy_benchmark examples/cuda/copy_benchmark.cu -I. -lnvidia-ml && ./copy_benchmarkRunning the HIP example benchmark
hipcc -o copy_benchmark examples/hip/copy_benchmark.cpp -I. -lamd_smi && ./copy_benchmarkTest Result
The above commands work for me, and the JSON and CSV output looks correct.
Submission Checklist