Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,12 @@ repos:
hooks:
- id: actionlint

- repo: https://github.com/MarcoGorelli/cython-lint
rev: "d9ff7ce99ef4f2ae8fba93079ca9d76c4651d4ac" # frozen: v0.18.0
hooks:
- id: cython-lint
args: [--no-pycodestyle]
exclude: ^cuda_bindings/

default_language_version:
python: python3
1 change: 0 additions & 1 deletion cuda_core/cuda/core/experimental/_context.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from dataclasses import dataclass

from cuda.core.experimental._utils.clear_error_support import assert_type
from cuda.core.experimental._utils.cuda_utils import driver


Expand Down
5 changes: 0 additions & 5 deletions cuda_core/cuda/core/experimental/_memory.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ from cuda.core.experimental._utils.cuda_utils cimport (
)

import abc
import array
import contextlib
import cython
from dataclasses import dataclass, field
from typing import Iterable, Literal, Optional, TYPE_CHECKING, TypeVar, Union
Expand All @@ -34,9 +32,6 @@ from cuda.core.experimental._dlpack import DLDeviceType, make_py_capsule
from cuda.core.experimental._stream import Stream
from cuda.core.experimental._utils.cuda_utils import ( driver, Transaction, get_binding_version )

if platform.system() == "Linux":
import socket

if TYPE_CHECKING:
from ._device import Device
import uuid
Expand Down
6 changes: 2 additions & 4 deletions cuda_core/cuda/core/experimental/_memoryview.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
#
# SPDX-License-Identifier: Apache-2.0

cimport cython

from ._dlpack cimport *

import functools
from typing import Any, Optional
from typing import Optional

import numpy

Expand Down Expand Up @@ -226,7 +224,7 @@ cdef class _StridedMemoryViewProxy:


cdef StridedMemoryView view_as_dlpack(obj, stream_ptr, view=None):
cdef int dldevice, device_id, i
cdef int dldevice, device_id
cdef bint is_device_accessible, is_readonly
is_device_accessible = False
dldevice, device_id = obj.__dlpack_device__()
Expand Down
2 changes: 0 additions & 2 deletions cuda_core/cuda/core/experimental/_stream.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ from cuda.core.experimental._utils.cuda_utils cimport (
)

import cython
import os
import warnings
from dataclasses import dataclass
from typing import TYPE_CHECKING, Optional, Protocol, Union
Expand All @@ -29,7 +28,6 @@ if TYPE_CHECKING:
from cuda.core.experimental._context import Context
from cuda.core.experimental._event import Event, EventOptions
from cuda.core.experimental._graph import GraphBuilder
from cuda.core.experimental._utils.clear_error_support import assert_type
from cuda.core.experimental._utils.cuda_utils import (
driver,
)
Expand Down
Loading