Skip to content

Commit 37b401a

Browse files
[pre-commit.ci] pre-commit autoupdate (#552)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.4 → v0.11.4](astral-sh/ruff-pre-commit@v0.6.4...v0.11.4) * [pre-commit.ci] auto code formatting * fix ruff failures on string formatting --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Keith Kraus <[email protected]>
1 parent 9ec2903 commit 37b401a

File tree

5 files changed

+19
-30
lines changed

5 files changed

+19
-30
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ci:
1111

1212
repos:
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.6.4
14+
rev: v0.11.4
1515
hooks:
1616
- id: ruff
1717
args: [--fix, --show-fixes]

cuda_bindings/cuda/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ def __getattr__(name):
33
import warnings
44

55
warnings.warn(
6-
"accessing cuda.__version__ is deprecated, " "please switch to use cuda.bindings.__version__ instead",
6+
"accessing cuda.__version__ is deprecated, please switch to use cuda.bindings.__version__ instead",
77
DeprecationWarning,
88
stacklevel=2,
99
)

cuda_bindings/examples/4_CUDA_Libraries/conjugateGradientMultiBlockCG_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,12 @@ def main():
230230
# This sample requires being run on a device that supports Cooperative Kernel
231231
# Launch
232232
if not deviceProp.cooperativeLaunch:
233-
print("\nSelected GPU (%d) does not support Cooperative Kernel Launch, Waiving the run" % (devID))
233+
print(f"\nSelected GPU {devID:%d} does not support Cooperative Kernel Launch, Waiving the run")
234234
return
235235

236236
# Statistics about the GPU device
237237
print(
238-
"> GPU device has %d Multi-Processors, SM %d.%d compute capabilities\n"
239-
% (deviceProp.multiProcessorCount, deviceProp.major, deviceProp.minor)
238+
f"> GPU device has {deviceProp.multiProcessorCount:%d} Multi-Processors, SM {deviceProp.major:%d}.{deviceProp.minor:%d} compute capabilities\n"
240239
)
241240

242241
# Get kernel

cuda_core/cuda/core/experimental/_utils/driver_cu_result_explanations.py

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
"the requested operation."
3535
),
3636
3: (
37-
"This indicates that the CUDA driver has not been initialized with cuInit() or that initialization "
38-
"has failed."
37+
"This indicates that the CUDA driver has not been initialized with cuInit() or that initialization has failed."
3938
),
4039
4: "This indicates that the CUDA driver is in the process of shutting down.",
4140
5: (
@@ -69,7 +68,7 @@
6968
"device or that the action requested is invalid for the specified device."
7069
),
7170
102: "This error indicates that the Grid license is not applied.",
72-
200: ("This indicates that the device kernel image is invalid. This can also indicate an invalid CUDA " "module."),
71+
200: ("This indicates that the device kernel image is invalid. This can also indicate an invalid CUDA module."),
7372
201: (
7473
"This most frequently indicates that there is no context bound to the current thread. This can also "
7574
"be returned if the context passed to an API call is not a valid handle (such as a context that has "
@@ -109,12 +108,9 @@
109108
221: "This indicates that the PTX JIT compiler library was not found.",
110109
222: "This indicates that the provided PTX was compiled with an unsupported toolchain.",
111110
223: "This indicates that the PTX JIT compilation was disabled.",
112-
224: (
113-
"This indicates that the CUexecAffinityType passed to the API call is not supported by the active " "device."
114-
),
111+
224: ("This indicates that the CUexecAffinityType passed to the API call is not supported by the active device."),
115112
225: (
116-
"This indicates that the code to be compiled by the PTX JIT contains unsupported call to "
117-
"cudaDeviceSynchronize."
113+
"This indicates that the code to be compiled by the PTX JIT contains unsupported call to cudaDeviceSynchronize."
118114
),
119115
226: (
120116
"This indicates that an exception occurred on the device that is now contained by the GPU's error "
@@ -194,7 +190,7 @@
194190
"This error indicates that the hardware resources required to enable peer access have been exhausted "
195191
"for one or more of the devices passed to cuCtxEnablePeerAccess()."
196192
),
197-
712: ("This error indicates that the memory range passed to cuMemHostRegister() has already been " "registered."),
193+
712: ("This error indicates that the memory range passed to cuMemHostRegister() has already been registered."),
198194
713: (
199195
"This error indicates that the pointer passed to cuMemHostUnregister() does not correspond to any "
200196
"currently registered memory region."
@@ -264,15 +260,15 @@
264260
"documentation for the supported hardware matrix or ensure that only supported hardware is visible "
265261
"during initialization via the CUDA_VISIBLE_DEVICES environment variable."
266262
),
267-
805: ("This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS " "server."),
268-
806: ("This error indicates that the remote procedural call between the MPS server and the MPS client " "failed."),
263+
805: ("This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server."),
264+
806: ("This error indicates that the remote procedural call between the MPS server and the MPS client failed."),
269265
807: (
270266
"This error indicates that the MPS server is not ready to accept new MPS client requests. This error "
271267
"can be returned when the MPS server is in the process of recovering from a fatal failure."
272268
),
273269
808: "This error indicates that the hardware resources required to create MPS client have been exhausted.",
274270
809: (
275-
"This error indicates the the hardware resources required to support device connections have been " "exhausted."
271+
"This error indicates the the hardware resources required to support device connections have been exhausted."
276272
),
277273
810: (
278274
"This error indicates that the MPS client has been terminated by the server. To continue using CUDA, "
@@ -292,20 +288,15 @@
292288
"previous error."
293289
),
294290
902: (
295-
"This error indicates that the operation would have resulted in a merge of two independent capture "
296-
"sequences."
291+
"This error indicates that the operation would have resulted in a merge of two independent capture sequences."
297292
),
298293
903: "This error indicates that the capture was not initiated in this stream.",
299-
904: (
300-
"This error indicates that the capture sequence contains a fork that was not joined to the primary " "stream."
301-
),
294+
904: ("This error indicates that the capture sequence contains a fork that was not joined to the primary stream."),
302295
905: (
303296
"This error indicates that a dependency would have been created which crosses the capture sequence "
304297
"boundary. Only implicit in-stream ordering dependencies are allowed to cross the boundary."
305298
),
306-
906: (
307-
"This error indicates a disallowed implicit dependency on a current capture sequence from " "cudaStreamLegacy."
308-
),
299+
906: ("This error indicates a disallowed implicit dependency on a current capture sequence from cudaStreamLegacy."),
309300
907: (
310301
"This error indicates that the operation is not permitted on an event which was last recorded in a "
311302
"capturing stream."

cuda_core/cuda/core/experimental/_utils/runtime_cuda_error_explanations.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"This indicates that one or more of the pitch-related parameters passed to the API call is not within"
6767
" the acceptable range for pitch."
6868
),
69-
13: ("This indicates that the symbol name/identifier passed to the API call is not a valid name or " "identifier."),
69+
13: ("This indicates that the symbol name/identifier passed to the API call is not a valid name or identifier."),
7070
16: (
7171
"This error return is deprecated as of CUDA 10.1. This indicates that at least one host pointer "
7272
"passed to the API call is not a valid host pointer."
@@ -277,8 +277,7 @@
277277
),
278278
224: "This indicates that the provided execution affinity is not supported by the device.",
279279
225: (
280-
"This indicates that the code to be compiled by the PTX JIT contains unsupported call to "
281-
"cudaDeviceSynchronize."
280+
"This indicates that the code to be compiled by the PTX JIT contains unsupported call to cudaDeviceSynchronize."
282281
),
283282
226: (
284283
"This indicates that an exception occurred on the device that is now contained by the GPU's error "
@@ -431,8 +430,8 @@
431430
"documentation for the supported hardware matrix or ensure that only supported hardware is visible "
432431
"during initialization via the CUDA_VISIBLE_DEVICES environment variable."
433432
),
434-
805: ("This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS " "server."),
435-
806: ("This error indicates that the remote procedural call between the MPS server and the MPS client " "failed."),
433+
805: ("This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server."),
434+
806: ("This error indicates that the remote procedural call between the MPS server and the MPS client failed."),
436435
807: (
437436
"This error indicates that the MPS server is not ready to accept new MPS client requests. This error "
438437
"can be returned when the MPS server is in the process of recovering from a fatal failure."

0 commit comments

Comments
 (0)