Skip to content

Commit bb336aa

Browse files
authored
Merge pull request #171 from leofang/experimental
Move everything to `cuda.core.experimental`
2 parents d809deb + 80a6a82 commit bb336aa

23 files changed

+57
-58
lines changed

cuda_core/cuda/core/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,4 @@
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44

5-
from cuda.core._device import Device
6-
from cuda.core._event import EventOptions
7-
from cuda.core._launcher import LaunchConfig, launch
8-
from cuda.core._program import Program
9-
from cuda.core._stream import Stream, StreamOptions
105
from cuda.core._version import __version__

cuda_core/cuda/core/experimental/__init__.pxd

Whitespace-only changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
2+
#
3+
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
4+
5+
from cuda.core.experimental._device import Device
6+
from cuda.core.experimental._event import EventOptions
7+
from cuda.core.experimental._launcher import LaunchConfig, launch
8+
from cuda.core.experimental._program import Program
9+
from cuda.core.experimental._stream import Stream, StreamOptions

cuda_core/cuda/core/_context.py renamed to cuda_core/cuda/core/experimental/_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from dataclasses import dataclass
66

77
from cuda import cuda, cudart
8-
from cuda.core._utils import handle_return
8+
from cuda.core.experimental._utils import handle_return
99

1010

1111
@dataclass

cuda_core/cuda/core/_device.py renamed to cuda_core/cuda/core/experimental/_device.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
import warnings
88

99
from cuda import cuda, cudart
10-
from cuda.core._utils import handle_return, ComputeCapability, CUDAError, \
10+
from cuda.core.experimental._utils import handle_return, ComputeCapability, CUDAError, \
1111
precondition
12-
from cuda.core._context import Context, ContextOptions
13-
from cuda.core._memory import _DefaultAsyncMempool, Buffer, MemoryResource
14-
from cuda.core._stream import default_stream, Stream, StreamOptions
12+
from cuda.core.experimental._context import Context, ContextOptions
13+
from cuda.core.experimental._memory import _DefaultAsyncMempool, Buffer, MemoryResource
14+
from cuda.core.experimental._stream import default_stream, Stream, StreamOptions
1515

1616

1717
_tls = threading.local()
@@ -125,7 +125,7 @@ def set_current(self, ctx: Context=None) -> Union[Context, None]:
125125
Entry point of this object. Users always start a code by
126126
calling this method, e.g.
127127
128-
>>> from cuda.core import Device
128+
>>> from cuda.core.experimental import Device
129129
>>> dev0 = Device(0)
130130
>>> dev0.set_current()
131131
>>> # ... do work on device 0 ...
File renamed without changes.
File renamed without changes.

cuda_core/cuda/core/_event.py renamed to cuda_core/cuda/core/experimental/_event.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
from typing import Optional
77

88
from cuda import cuda
9-
from cuda.core._utils import check_or_create_options
10-
from cuda.core._utils import CUDAError
11-
from cuda.core._utils import handle_return
9+
from cuda.core.experimental._utils import check_or_create_options
10+
from cuda.core.experimental._utils import CUDAError
11+
from cuda.core.experimental._utils import handle_return
1212

1313

1414
@dataclass

cuda_core/cuda/core/_kernel_arg_handler.pyx renamed to cuda_core/cuda/core/experimental/_kernel_arg_handler.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import ctypes
1515

1616
import numpy
1717

18-
from cuda.core._memory import Buffer
18+
from cuda.core.experimental._memory import Buffer
1919

2020

2121
ctypedef cpp_complex.complex[float] cpp_single_complex

cuda_core/cuda/core/_launcher.py renamed to cuda_core/cuda/core/experimental/_launcher.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
import numpy as np
99

1010
from cuda import cuda, cudart
11-
from cuda.core._kernel_arg_handler import ParamHolder
12-
from cuda.core._memory import Buffer
13-
from cuda.core._module import Kernel
14-
from cuda.core._stream import Stream
15-
from cuda.core._utils import CUDAError, check_or_create_options, handle_return
11+
from cuda.core.experimental._kernel_arg_handler import ParamHolder
12+
from cuda.core.experimental._memory import Buffer
13+
from cuda.core.experimental._module import Kernel
14+
from cuda.core.experimental._stream import Stream
15+
from cuda.core.experimental._utils import CUDAError, check_or_create_options, handle_return
1616

1717

1818
@dataclass

0 commit comments

Comments
 (0)