Skip to content

Commit

Permalink
resolve ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ksimpson-work committed Oct 29, 2024
1 parent 09726d8 commit acef07f
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 21 deletions.
2 changes: 1 addition & 1 deletion cuda_core/cuda/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE

from cuda.core._version import __version__
from cuda.core._version import __version__ as __version__
10 changes: 5 additions & 5 deletions cuda_core/cuda/core/experimental/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE

from cuda.core.experimental._device import Device
from cuda.core.experimental._event import EventOptions
from cuda.core.experimental._launcher import LaunchConfig, launch
from cuda.core.experimental._program import Program
from cuda.core.experimental._stream import Stream, StreamOptions
from cuda.core.experimental._device import Device as Device
from cuda.core.experimental._event import EventOptions as EventOptions
from cuda.core.experimental._launcher import LaunchConfig as LaunchConfig, launch as launch
from cuda.core.experimental._program import Program as Program
from cuda.core.experimental._stream import Stream as Stream, StreamOptions as StreamOptions
3 changes: 1 addition & 2 deletions cuda_core/cuda/core/experimental/_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

from dataclasses import dataclass

from cuda import cuda, cudart
from cuda.core.experimental._utils import handle_return
from cuda import cuda


@dataclass
Expand Down
3 changes: 1 addition & 2 deletions cuda_core/cuda/core/experimental/_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE

import threading
from typing import Optional, Union
import warnings
from typing import Union

from cuda import cuda, cudart
from cuda.core.experimental._utils import handle_return, ComputeCapability, CUDAError, \
Expand Down
4 changes: 1 addition & 3 deletions cuda_core/cuda/core/experimental/_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
import importlib.metadata
from typing import Optional, Union

import numpy as np

from cuda import cuda, cudart
from cuda import cuda
from cuda.core.experimental._kernel_arg_handler import ParamHolder
from cuda.core.experimental._memory import Buffer
from cuda.core.experimental._module import Kernel
from cuda.core.experimental._stream import Stream
from cuda.core.experimental._utils import CUDAError, check_or_create_options, handle_return
Expand Down
1 change: 0 additions & 1 deletion cuda_core/cuda/core/experimental/_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import abc
from typing import Optional, Tuple, TypeVar
import warnings

from cuda import cuda
from cuda.core.experimental._dlpack import DLDeviceType, make_py_capsule
Expand Down
2 changes: 1 addition & 1 deletion cuda_core/cuda/core/experimental/_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import importlib.metadata

from cuda import cuda, cudart
from cuda import cuda
from cuda.core.experimental._utils import handle_return


Expand Down
8 changes: 5 additions & 3 deletions cuda_core/cuda/core/experimental/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
from typing import Callable, Dict

from cuda import cuda, cudart, nvrtc
from cuda.core.experimental._device import Device

class CUDAError(Exception):
pass

class CUDAError(Exception): pass


class NVRTCError(CUDAError): pass
class NVRTCError(CUDAError):
pass


ComputeCapability = namedtuple("ComputeCapability", ("major", "minor"))
Expand Down
1 change: 0 additions & 1 deletion cuda_core/cuda/core/experimental/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE

from cuda.core.experimental._memoryview import StridedMemoryView, viewable
1 change: 0 additions & 1 deletion cuda_core/tests/example_tests/test_basic_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@
)
class TestExamples:
def test_example(self, example):
filename = os.path.basename(example)
run_example(samples_path, example)
1 change: 0 additions & 1 deletion cuda_core/tests/example_tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# this software and related documentation outside the terms of the EULA
# is strictly prohibited.

from cuda import cuda
import gc
import os
import sys
Expand Down

0 comments on commit acef07f

Please sign in to comment.