-
Notifications
You must be signed in to change notification settings - Fork 125
[CUDA] Refactor device initialization #1363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CUDA] Refactor device initialization #1363
Conversation
14d3701
to
fe5d5d0
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1363 +/- ##
==========================================
- Coverage 14.82% 12.43% -2.40%
==========================================
Files 250 241 -9
Lines 36220 36242 +22
Branches 4094 4111 +17
==========================================
- Hits 5369 4506 -863
- Misses 30800 31732 +932
+ Partials 51 4 -47 ☔ View full report in Codecov by Sentry. |
Friendly ping @konradkusiak97 |
Should there be an intel/llvm CI for this? |
Oops forgot to link it. Here it is intel/llvm#12762 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha that's strange how it was done before, it could've been partially my fault for not seeing this duplication with my caching PRs. Nice refactor, LGTM!
Just a side note, it seems some of those changes could also be applied to the HIP adapter, do you think it would be feasible to squeeze it together here?
The HIP adapter is only checking this stuff once. It does it in a different manner, ie it doesnt use the ur helper, but I think there isn't anything wrong with the current approach of the HIP adapter so I would be inclined to leave it as it is. Let me know if you agree! |
Sounds good! |
Some logic for device initialization was split across platform init and device init. This duplicated some calls to get info for max block dim in Y and Z dimension. This rectifies that and makes sure the max block dims are only queried once, which is called from the device constructor.
Remove duplicate/redundant member vars
fe5d5d0
to
2968cc1
Compare
…lization [CUDA] Refactor device initialization
Some logic for device initialization was split across platform init and device init. This duplicated some calls to get info for max block dim in Y and Z dimension. This rectifies that and makes sure the max block dims are only queried once, which is called from the device constructor.