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
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@


def setup(app: Sphinx) -> None:
app.connect("missing-reference", process_autodoc_missing_reference) # noqa: F821
app.connect("missing-reference", process_autodoc_missing_reference) # ruff:ignore[undefined-name]
2 changes: 1 addition & 1 deletion examples/ipython-demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
},
"outputs": [],
"source": [
"sum_vector(queue, (n,), None, a.data, b.data, c.data) # noqa: F821"
"sum_vector(queue, (n,), None, a.data, b.data, c.data) # ruff:ignore[undefined-name]"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions examples/pi-monte-carlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def MetropolisCuda(InputCU):
)
# mod = SourceModule(KernelCodeCuda(),nvcc='nvcc',keep=True)
# Needed to set the compiler via ccbin for CUDA9 implementation
# mod = SourceModule(KernelCodeCuda(),options=['-ccbin','clang-3.9','--compiler-options','-DTRNG=%i' % Marsaglia[RNG],'-DTYPE=%s' % Computing[ValueType],'-DTEST=%s' % Test[TestType]],keep=True) # noqa: E501
# mod = SourceModule(KernelCodeCuda(),options=['-ccbin','clang-3.9','--compiler-options','-DTRNG=%i' % Marsaglia[RNG],'-DTYPE=%s' % Computing[ValueType],'-DTEST=%s' % Test[TestType]],keep=True) # ruff:ignore[line-too-long]
except Exception:
print("Compilation seems to break")

Expand Down Expand Up @@ -771,7 +771,7 @@ def FitAndPrint(N, D, Curves):
# Seeds for RNG
Seeds = 110271, 101008

HowToUse = "%s -o (Out of Core Metrology) -c (Print Curves) -k (Case On IfThen) -d <DeviceId> -g <CUDA/OpenCL> -i <Iterations> -b <BlocksBegin> -e <BlocksEnd> -s <BlocksStep> -f <ThreadsFirst> -l <ThreadsLast> -t <ThreadssTep> -r <RedoToImproveStats> -m <SHR3/CONG/MWC/KISS> -v <INT32/INT64/FP32/FP64>" # noqa: E501
HowToUse = "%s -o (Out of Core Metrology) -c (Print Curves) -k (Case On IfThen) -d <DeviceId> -g <CUDA/OpenCL> -i <Iterations> -b <BlocksBegin> -e <BlocksEnd> -s <BlocksStep> -f <ThreadsFirst> -l <ThreadsLast> -t <ThreadssTep> -r <RedoToImproveStats> -m <SHR3/CONG/MWC/KISS> -v <INT32/INT64/FP32/FP64>" # ruff:ignore[line-too-long]

try:
opts, args = getopt.getopt(
Expand Down Expand Up @@ -1031,7 +1031,7 @@ def FitAndPrint(N, D, Curves):
Inside = OutputCU["Inside"]
NewIterations = OutputCU["NewIterations"]
Duration = OutputCU["Duration"]
pycuda.context.pop() # noqa: F821
pycuda.context.pop() # ruff:ignore[undefined-name]
except Exception:
print(
"Problem with (%i,%i) // computations on Cuda"
Expand Down Expand Up @@ -1159,4 +1159,4 @@ def FitAndPrint(N, D, Curves):

if Fit:
# FIXME: undefined var 'median'
FitAndPrint(ExploredJobs, median, Curves) # noqa: F821
FitAndPrint(ExploredJobs, median, Curves) # ruff:ignore[undefined-name]
10 changes: 5 additions & 5 deletions pyopencl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
SVMInnerT,
WaitList,
)
from pyopencl._cl import ( # noqa: F401
from pyopencl._cl import ( # ruff:ignore[unused-import]
get_cl_header_version,
program_kind,
status_code,
Expand Down Expand Up @@ -219,7 +219,7 @@
from pyopencl._cl import UserEvent
if get_cl_header_version() >= (1, 2):
from pyopencl._cl import ImageDescriptor
from pyopencl._cl import ( # noqa: F401
from pyopencl._cl import ( # ruff:ignore[unused-import]
_enqueue_barrier_with_wait_list, _enqueue_fill_buffer,
_enqueue_marker_with_wait_list, enqueue_fill_image,
enqueue_migrate_mem_objects, unload_platform_compiler)
Expand Down Expand Up @@ -473,7 +473,7 @@ def __getattr__(self, attr: str) -> Kernel:
knl = Kernel(self, attr)
# Nvidia does not raise errors even for invalid names,
# but this will give an error if the kernel is invalid.
knl.num_args # noqa: B018
knl.num_args # ruff:ignore[useless-expression]

count = self._knl_retrieval_count[attr] = (
self._knl_retrieval_count.get(attr, 0) + 1)
Expand Down Expand Up @@ -1490,8 +1490,8 @@ def enqueue_fill(queue: CommandQueue,
np.dtype(np.uint8): channel_type.UNSIGNED_INT8,
}
try:
np.float16 # noqa: B018
except Exception: # noqa: S110
np.float16 # ruff:ignore[useless-expression]
except Exception: # ruff:ignore[try-except-pass]
pass
else:
DTYPE_TO_CHANNEL_TYPE[np.dtype(np.float16)] = channel_type.HALF_FLOAT
Expand Down
Loading
Loading