Repository navigation
feat(rocrand): Implement Kernel Tuner for rocRAND. - #12750
Conversation
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
Pre-commit check failed⛔ pre-commit failed Please run locally:
This repo uses |
4bd0ed7 to
baa1c50
Compare
amd-mcieslak
left a comment
There was a problem hiding this comment.
I've pulled the branch and am testing on gfx950 (MI355), and overall works well. However, Primbench settings (min/max GPU temp, warming/cooling time) can't be set from the CLI. I had to edit the template to lower min temp to 49 °C on MI355.
Claude found a couple of items to consider:
-
The threefry 64 ULL change looks like it removes the
output_type_supportedprimary template, which could break compilation of those wrappers. This might not be obvious when running: Kernel Tuner records compile errors as failed configs, so the run can look finished while producing no valid results. Should be checked. -
generate.pycan write empty headers, and doesn't handle failed configs. Please check if Kernel Tuner stores failed configs with a stringtime(e.g."CompilationFailedConfig","RuntimeFailedConfig"). The"time" in cfilter keeps those, somin(..., key=lambda c: c["time"])could raiseTypeError(str vs float) whenever a run has any failures. If every config failed,min()on an empty list raisesValueErrorinstead.
amd-jmahovsky
left a comment
There was a problem hiding this comment.
I found a few more potential issues.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #12750 +/- ##
===========================================
- Coverage 72.12% 70.68% -1.44%
===========================================
Files 2861 2940 +79
Lines 472095 484570 +12475
Branches 69805 69880 +75
===========================================
+ Hits 340454 342487 +2033
- Misses 107909 118190 +10281
- Partials 23732 23893 +161
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
|
🎉 All checks passed! This PR is ready for review. |
amd-jmahovsky
left a comment
There was a problem hiding this comment.
Claude pointed out a bunch of edge case issues that can lead to data loss and crashes, but the most important thing is how we are calculating the time to compare performance: geometric mean vs arithmetic mean and how they weight slow vs faster tests.
amd-jmahovsky
left a comment
There was a problem hiding this comment.
Another review pass. Looks like a few issues still.
feat(rocrand): Implement Kernel Tuner for rocRAND. ## Motivation Migration of the legacy tuner to use Kernel Tuner instead. JIRA ID: AIPRIMS-236 & EXSWSTRHPC-322 ## Technical Details A lot of addition was based on Kernel Tuner from `rocPRIM` . However there are some significant differences. - `migrate.py` does not exists for `rocRAND`. This is because `rocRAND` does not queue and tune types the way `rocPRIM` does. Instead it queues all distributions and different types through templated functions. Since this is the case the config file only ever consists of two functions that needs updating, and thus `migrate.py` is not needed. - `genereate.py` a lot of internal changes were made to accommodate the fact that `key_type` and `value_type` are not really used in `rocRAND` auto tuning. - `parse.py` was changed completely. Since `rocRAND` is much more simple than `rocPRIM` we should be able to include all the changes in one PR. Currently we are done `lfsr113` generators. This will be the TODO: - [x] mrg31k3p - [x] mrg32k3a - [x] mt19937 - [x] mtgp32 - [x] philox4_32_10 - [x] three_fry2_32_20 - [x] three_fry2_64_20 - [x] threefry4_32_20 - [x] threefry4_64_20 - [x] xorwow ## Test Plan Generate all configs and test that it compiles, and that the output are not garbage. ## Test Result Pending test results. ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.
TheRock Submodule Bump ActivityNewest first
|
Motivation
Migration of the legacy tuner to use Kernel Tuner instead.
JIRA ID: AIPRIMS-236 & EXSWSTRHPC-322
Technical Details
A lot of addition was based on Kernel Tuner from
rocPRIM. However there are some significant differences.migrate.pydoes not exists forrocRAND. This is becauserocRANDdoes not queue and tune types the wayrocPRIMdoes. Instead it queues all distributions and different types through templated functions. Since this is the case the config file only ever consists of two functions that needs updating, and thusmigrate.pyis not needed.genereate.pya lot of internal changes were made to accommodate the fact thatkey_typeandvalue_typeare not really used inrocRANDauto tuning.parse.pywas changed completely.Since
rocRANDis much more simple thanrocPRIMwe should be able to include all the changes in one PR. Currently we are donelfsr113generators. This will be the TODO:Test Plan
Generate all configs and test that it compiles, and that the output are not garbage.
Test Result
Pending test results.
Submission Checklist