Skip to content

Commit

Permalink
Replace custom CUDA bindings previously provided by RMM with official…
Browse files Browse the repository at this point in the history
… CUDA

Python bindings
  • Loading branch information
shwina committed Jan 10, 2022
1 parent dd390a2 commit 86f00a3
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions python/cudf/cudf/utils/gpu_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ def validate_setup():

import warnings

from cuda.cudart import cudaDeviceAttr, cudaError_t

from rmm._cuda.gpu import (
CUDARuntimeError,
cudaDeviceAttr,
cudaError,
deviceGetName,
driverGetVersion,
getDeviceAttribute,
Expand All @@ -30,30 +30,30 @@ def _try_get_old_or_new_symbols():
try:
# CUDA 10.2+ symbols
return [
cudaError.cudaErrorDeviceUninitialized,
cudaError.cudaErrorTimeout,
cudaError_t.cudaErrorDeviceUninitialized,
cudaError_t.cudaErrorTimeout,
]
except AttributeError:
# CUDA 10.1 symbols
return [cudaError.cudaErrorDeviceUninitilialized]
return [cudaError_t.cudaErrorDeviceUninitilialized]

notify_caller_errors = {
cudaError.cudaErrorInitializationError,
cudaError.cudaErrorInsufficientDriver,
cudaError.cudaErrorInvalidDeviceFunction,
cudaError.cudaErrorInvalidDevice,
cudaError.cudaErrorStartupFailure,
cudaError.cudaErrorInvalidKernelImage,
cudaError.cudaErrorAlreadyAcquired,
cudaError.cudaErrorOperatingSystem,
cudaError.cudaErrorNotPermitted,
cudaError.cudaErrorNotSupported,
cudaError.cudaErrorSystemNotReady,
cudaError.cudaErrorSystemDriverMismatch,
cudaError.cudaErrorCompatNotSupportedOnDevice,
cudaError_t.cudaErrorInitializationError,
cudaError_t.cudaErrorInsufficientDriver,
cudaError_t.cudaErrorInvalidDeviceFunction,
cudaError_t.cudaErrorInvalidDevice,
cudaError_t.cudaErrorStartupFailure,
cudaError_t.cudaErrorInvalidKernelImage,
cudaError_t.cudaErrorAlreadyAcquired,
cudaError_t.cudaErrorOperatingSystem,
cudaError_t.cudaErrorNotPermitted,
cudaError_t.cudaErrorNotSupported,
cudaError_t.cudaErrorSystemNotReady,
cudaError_t.cudaErrorSystemDriverMismatch,
cudaError_t.cudaErrorCompatNotSupportedOnDevice,
*_try_get_old_or_new_symbols(),
cudaError.cudaErrorUnknown,
cudaError.cudaErrorApiFailureBase,
cudaError_t.cudaErrorUnknown,
cudaError_t.cudaErrorApiFailureBase,
}

try:
Expand Down

0 comments on commit 86f00a3

Please sign in to comment.