-
Notifications
You must be signed in to change notification settings - Fork 310
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
Use cuda-python bindings for getting device properties. #4830
Conversation
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
return f"{major}.{minor}" | ||
|
||
|
||
def _is_ampere_or_newer(): |
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.
I implemented what was here before, but I would double-check this logic: are our notebooks still failing on Ampere and newer? Does this check need to be removed?
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.
LGTM. I'm in favor of committing what's here now then checking the notebooks that use the "# Does not run on Ampere" comment on Ampere to see if it's still needed. If not needed, we can have a followup PR to remove it and/or the comments.
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.
@rlratzel Sounds good. I will follow up with a PR that removes this, and our CI will cover the check. Our ARM runners use Ampere.
@@ -19,7 +19,6 @@ | |||
from cugraph.utilities.path_retrieval cimport get_traversed_cost as c_get_traversed_cost | |||
from cugraph.structure.graph_primtypes cimport * | |||
from libc.stdint cimport uintptr_t | |||
from numba import cuda |
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.
This was an unused import.
@@ -210,45 +207,42 @@ def get_traversed_path_list(df, id): | |||
return answer | |||
|
|||
|
|||
def is_cuda_version_less_than(min_version=(10, 2)): | |||
def is_cuda_version_less_than(min_version): |
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.
Based on the function name, this should not have a default value. Its default was also outdated.
This function also appears to be unused. Do we want to keep it?
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.
Removing it seems like a good idea to me.
|
||
|
||
def is_device_version_less_than(min_version=(7, 0)): | ||
def is_device_version_less_than(min_version): |
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.
Based on the function name, this should not have a default value.
It appears this is only used once, to guard against use on Pascal. However, we dropped Pascal a year ago. Can we remove this guard on the test? Then, can we delete this function since it is unused?
is_device_version_less_than((7, 0)), reason="Not supported on Pascal" |
Co-authored-by: jakirkham <[email protected]>
It seems like the same or similar version functions are in multiple places. Could we pick one and use that in the other places? |
I think some of these are needed in odd places -- things like listing compatible notebooks shouldn't require a cugraph utility function. There may be some opportunities for removal, though. See my comments above. |
Agreed. Maybe @dantegd can provide us some guidance 😉 |
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.
AFAICT, no real CI or packaging changes were made to justify the copyright updates. Just reset the copyrights as CI is suggesting.
@@ -210,45 +207,42 @@ def get_traversed_path_list(df, id): | |||
return answer | |||
|
|||
|
|||
def is_cuda_version_less_than(min_version=(10, 2)): | |||
def is_cuda_version_less_than(min_version): |
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.
Removing it seems like a good idea to me.
return f"{major}.{minor}" | ||
|
||
|
||
def _is_ampere_or_newer(): |
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.
LGTM. I'm in favor of committing what's here now then checking the notebooks that use the "# Does not run on Ampere" comment on Ampere to see if it's still needed. If not needed, we can have a followup PR to remove it and/or the comments.
/merge |
This PR removes some utilities that were updated in #4830 but are no longer needed. xref: rapidsai/build-planning#117 Authors: - Bradley Dice (https://github.com/bdice) Approvers: - James Lamb (https://github.com/jameslamb) - Rick Ratzel (https://github.com/rlratzel) URL: #4855
This PR uses
cuda-python
for getting device properties. These APIs are more stable than getting this information vianumba.cuda
.Companion to #4829 (this is not dependent on that PR, though).