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

Fix call to getDeviceAttribute following API change in RMM. #2008

Merged
merged 5 commits into from
Jan 20, 2022
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions python/cugraph/cugraph/utilities/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020-2021, NVIDIA CORPORATION.
# Copyright (c) 2020-2022, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -16,10 +16,7 @@
from numba import cuda

import cudf
from rmm._cuda.gpu import (
getDeviceAttribute,
cudaDeviceAttr,
)
from rmm._cuda.gpu import getDeviceAttribute


# optional dependencies
Expand Down Expand Up @@ -217,12 +214,8 @@ def is_device_version_less_than(min_version=(7, 0)):
"""
Returns True if the version of CUDA being used is less than min_version
"""
major_version = getDeviceAttribute(
cudaDeviceAttr.cudaDevAttrComputeCapabilityMajor, 0
)
minor_version = getDeviceAttribute(
cudaDeviceAttr.cudaDevAttrComputeCapabilityMinor, 0
)
major_version = getDeviceAttribute("ComputeCapabilityMajor", 0)
minor_version = getDeviceAttribute("ComputeCapabilityMinor", 0)
if major_version > min_version[0]:
return False
if major_version < min_version[0]:
Expand Down