Skip to content
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

Open
wants to merge 5 commits into
base: branch-25.02
Choose a base branch
from

Conversation

bdice
Copy link
Contributor

@bdice bdice commented Dec 11, 2024

This PR uses cuda-python for getting device properties. These APIs are more stable than getting this information via numba.cuda.

Companion to #4829 (this is not dependent on that PR, though).

Copy link

copy-pr-bot bot commented Dec 11, 2024

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.

@bdice bdice self-assigned this Dec 11, 2024
return f"{major}.{minor}"


def _is_ampere_or_newer():
Copy link
Contributor Author

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?

@@ -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
Copy link
Contributor Author

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.

ci/notebook_list.py Outdated Show resolved Hide resolved
@@ -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):
Copy link
Contributor Author

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?



def is_device_version_less_than(min_version=(7, 0)):
def is_device_version_less_than(min_version):
Copy link
Contributor Author

@bdice bdice Dec 11, 2024

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]>
@bdice bdice marked this pull request as ready for review December 11, 2024 17:00
@bdice bdice requested review from a team as code owners December 11, 2024 17:00
@bdice bdice requested a review from AyodeAwe December 11, 2024 17:00
@bdice bdice added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Dec 11, 2024
@jakirkham
Copy link
Member

It seems like the same or similar version functions are in multiple places. Could we pick one and use that in the other places?

@bdice
Copy link
Contributor Author

bdice commented Dec 11, 2024

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.

@jakirkham
Copy link
Member

Agreed. Maybe @dantegd can provide us some guidance 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci improvement Improvement / enhancement to an existing function non-breaking Non-breaking change python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants