Coverage report: /home/ellis/comp/core/ffi/cuda/type.lisp
Kind | Covered | All | % |
expression | 0 | 14 | 0.0 |
branch | 0 | 0 | nil |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;; type.lisp --- CUDA Types
8
(define-alien-type cu-device int)
9
(define-alien-type cu-context (* t))
10
(define-alien-type cu-module (* t))
11
(define-alien-type cu-function (* t))
12
(define-alien-type cu-stream (* t))
13
(define-alien-type cu-event (* t))
14
(define-alien-type cu-graphics-resource (* t))
15
(define-alien-type cu-device-ptr unsigned-long-long)
17
(define-alien-enum (cu-event-flag int)
23
(define-alien-enum (cu-stream-flag int)
27
(define-alien-enum (cu-memhostalloc-flag int)
32
(define-alien-enum (cu-memhostregister-flag int)
40
;; The API call returned with no errors. In the case of query calls, this
41
;; also means that the operation being queried is complete (see
42
;; ::cuEventQuery() and ::cuStreamQuery()).
45
* This indicates that one or more of the parameters passed to the API call
46
* is not within an acceptable range of values.
48
:error-invalid-value 1
51
* The API call failed because it was unable to allocate enough memory or
52
* other resources to perform the requested operation.
54
:error-out-of-memory 2
57
* This indicates that the CUDA driver has not been initialized with
58
* ::cuInit() or that initialization has failed.
60
:error-not-initialized 3
63
* This indicates that the CUDA driver is in the process of shutting down.
65
:error-deinitialized 4
68
* This indicates profiler is not initialized for this run. This can
69
* happen when the application is running with external profiling tools
70
* like visual profiler.
72
:error-profiler-disabled 5
76
* This error return is deprecated as of CUDA 5.0. It is no longer an error
77
* to attempt to enable/disable the profiling via ::cuProfilerStart or
78
* ::cuProfilerStop without initialization.
80
:error-profiler-not-initialized 6
84
* This error return is deprecated as of CUDA 5.0. It is no longer an error
85
* to call cuProfilerStart() when profiling is already enabled.
87
:error-profiler-already-started 7
91
* This error return is deprecated as of CUDA 5.0. It is no longer an error
92
* to call cuProfilerStop() when profiling is already disabled.
94
:error-profiler-already-stopped 8
97
* This indicates that the CUDA driver that the application has loaded is a
98
* stub library. Applications that run with the stub rather than a real
99
* driver loaded will result in CUDA API returning this error.
101
:error-stub-library 34
104
* This indicates that requested CUDA device is unavailable at the current
105
* time. Devices are often unavailable due to use of
106
* ::CU_COMPUTEMODE_EXCLUSIVE_PROCESS or ::CU_COMPUTEMODE_PROHIBITED.
108
:error-device-unavailable 46
111
* This indicates that no CUDA-capable devices were detected by the installed
117
* This indicates that the device ordinal supplied by the user does not
118
* correspond to a valid CUDA device or that the action requested is
119
* invalid for the specified device.
121
:error-invalid-device 101
124
* This error indicates that the Grid license is not applied.
126
:error-device-not-licensed 102
129
* This indicates that the device kernel image is invalid. This can also
130
* indicate an invalid CUDA module.
132
:error-invalid-image 200
135
* This most frequently indicates that there is no context bound to the
136
* current thread. This can also be returned if the context passed to an
137
* API call is not a valid handle (such as a context that has had
138
* ::cuCtxDestroy() invoked on it). This can also be returned if a user
139
* mixes different API versions (i.e. 3010 context with 3020 API calls).
140
* See ::cuCtxGetApiVersion() for more details.
141
* This can also be returned if the green context passed to an API call
142
* was not converted to a ::CUcontext using ::cuCtxFromGreenCtx API.
144
:error-invalid-context 201
147
* This indicated that the context being supplied as a parameter to the
148
* API call was already the active context.
150
* This error return is deprecated as of CUDA 3.2. It is no longer an
151
* error to attempt to push the active context via ::cuCtxPushCurrent().
153
:error-context-already-current 202
156
* This indicates that a map or register operation has failed.
158
:error-map-failed 205
161
* This indicates that an unmap or unregister operation has failed.
163
:error-unmap-failed 206
166
* This indicates that the specified array is currently mapped and thus
167
* cannot be destroyed.
169
:error-array-is-mapped 207
172
* This indicates that the resource is already mapped.
174
:error-already-mapped 208
177
* This indicates that there is no kernel image available that is suitable
178
* for the device. This can occur when a user specifies code generation
179
* options for a particular CUDA source file that do not include the
180
* corresponding device configuration.
182
:error-no-binary-for-gpu 209
185
* This indicates that a resource has already been acquired.
187
:error-already-acquired 210
190
* This indicates that a resource is not mapped.
192
:error-not-mapped 211
195
* This indicates that a mapped resource is not available for access as an
198
:error-not-mapped-as-array 212
201
* This indicates that a mapped resource is not available for access as a
204
:error-not-mapped-as-pointer 213
207
* This indicates that an uncorrectable ECC error was detected during
210
:error-ecc-uncorrectable 214
213
* This indicates that the ::CUlimit passed to the API call is not
214
* supported by the active device.
216
:error-unsupported-limit 215
219
* This indicates that the ::CUcontext passed to the API call can
220
* only be bound to a single CPU thread at a time but is already
221
* bound to a CPU thread.
223
:error-context-already-in-use 216
226
* This indicates that peer access is not supported across the given
229
:error-peer-access-unsupported 217
232
* This indicates that a PTX JIT compilation failed.
234
:error-invalid-ptx 218
237
* This indicates an error with OpenGL or DirectX context.
239
:error-invalid-graphics-context 219
242
* This indicates that an uncorrectable NVLink error was detected during the
245
:error-nvlink-uncorrectable 220
248
* This indicates that the PTX JIT compiler library was not found.
250
:error-jit-compiler-not-found 221
253
* This indicates that the provided PTX was compiled with an unsupported toolchain.
255
:error-unsupported-ptx-version 222
258
* This indicates that the PTX JIT compilation was disabled.
260
:error-jit-compilation-disabled 223
263
* This indicates that the ::CUexecAffinityType passed to the API call is not
264
* supported by the active device.
266
:error-unsupported-exec-affinity 224
269
* This indicates that the code to be compiled by the PTX JIT contains
270
* unsupported call to cudaDeviceSynchronize.
272
:error-unsupported-devside-sync 225
275
* This indicates that the device kernel source is invalid. This includes
276
* compilation/linker errors encountered in device code or user error.
278
:error-invalid-source 300
281
* This indicates that the file specified was not found.
283
:error-file-not-found 301
286
* This indicates that a link to a shared object failed to resolve.
288
:error-shared-object-symbol-not-found 302
291
* This indicates that initialization of a shared object failed.
293
:error-shared-object-init-failed 303
296
* This indicates that an OS call failed.
298
:error-operating-system 304
301
* This indicates that a resource handle passed to the API call was not
302
* valid. Resource handles are opaque types like ::CUstream and ::CUevent.
304
:error-invalid-handle 400
307
* This indicates that a resource required by the API call is not in a
308
* valid state to perform the requested operation.
310
:error-illegal-state 401
313
* This indicates an attempt was made to introspect an object in a way that
314
* would discard semantically important information. This is either due to
315
* the object using funtionality newer than the API version used to
316
* introspect it or omission of optional return arguments.
318
:error-lossy-query 402
321
* This indicates that a named symbol was not found. Examples of symbols
322
* are global/constant variable names, driver function names, texture names,
328
* This indicates that asynchronous operations issued previously have not
329
* completed yet. This result is not actually an error, but must be indicated
330
* differently than ::CUDA_SUCCESS (which indicates completion). Calls that
331
* may return this value include ::cuEventQuery() and ::cuStreamQuery().
336
* While executing a kernel, the device encountered a
337
* load or store instruction on an invalid memory address.
338
* This leaves the process in an inconsistent state and any further CUDA work
339
* will return the same error. To continue using CUDA, the process must be terminated
342
:error-illegal-address 700
345
* This indicates that a launch did not occur because it did not have
346
* appropriate resources. This error usually indicates that the user has
347
* attempted to pass too many arguments to the device kernel, or the
348
* kernel launch specifies too many threads for the kernel's register
349
* count. Passing arguments of the wrong size (i.e. a 64-bit pointer
350
* when a 32-bit int is expected) is equivalent to passing too many
351
* arguments and can also result in this error.
353
:error-launch-out-of-resources 701
356
* This indicates that the device kernel took too long to execute. This can
357
* only occur if timeouts are enabled - see the device attribute
358
* ::CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT for more information.
359
* This leaves the process in an inconsistent state and any further CUDA work
360
* will return the same error. To continue using CUDA, the process must be terminated
363
:error-launch-timeout 702
366
* This error indicates a kernel launch that uses an incompatible texturing
369
:error-launch-incompatible-texturing 703
372
* This error indicates that a call to ::cuCtxEnablePeerAccess() is
373
* trying to re-enable peer access to a context which has already
374
* had peer access to it enabled.
376
:error-peer-access-already-enabled 704
379
* This error indicates that ::cuCtxDisablePeerAccess() is
380
* trying to disable peer access which has not been enabled yet
381
* via ::cuCtxEnablePeerAccess().
383
:error-peer-access-not-enabled 705
386
* This error indicates that the primary context for the specified device
387
* has already been initialized.
389
:error-primary-context-active 708
392
* This error indicates that the context current to the calling thread
393
* has been destroyed using ::cuCtxDestroy, or is a primary context which
394
* has not yet been initialized.
396
:error-context-is-destroyed 709
399
* A device-side assert triggered during kernel execution. The context
400
* cannot be used anymore, and must be destroyed. All existing device
401
* memory allocations from this context are invalid and must be
402
* reconstructed if the program is to continue using CUDA.
407
* This error indicates that the hardware resources required to enable
408
* peer access have been exhausted for one or more of the devices
409
* passed to ::cuCtxEnablePeerAccess().
411
:error-too-many-peers 711
414
* This error indicates that the memory range passed to ::cuMemHostRegister()
415
* has already been registered.
417
:error-host-memory-already-registered 712
420
* This error indicates that the pointer passed to ::cuMemHostUnregister()
421
* does not correspond to any currently registered memory region.
423
:error-host-memory-not-registered 713
426
* While executing a kernel, the device encountered a stack error.
427
* This can be due to stack corruption or exceeding the stack size limit.
428
* This leaves the process in an inconsistent state and any further CUDA work
429
* will return the same error. To continue using CUDA, the process must be terminated
432
:error-hardware-stack-error 714
435
* While executing a kernel, the device encountered an illegal instruction.
436
* This leaves the process in an inconsistent state and any further CUDA work
437
* will return the same error. To continue using CUDA, the process must be terminated
440
:error-illegal-instruction 715
443
* While executing a kernel, the device encountered a load or store instruction
444
* on a memory address which is not aligned.
445
* This leaves the process in an inconsistent state and any further CUDA work
446
* will return the same error. To continue using CUDA, the process must be terminated
449
:error-misaligned-address 716
452
* While executing a kernel, the device encountered an instruction
453
* which can only operate on memory locations in certain address spaces
454
* (global, shared, or local), but was supplied a memory address not
455
* belonging to an allowed address space.
456
* This leaves the process in an inconsistent state and any further CUDA work
457
* will return the same error. To continue using CUDA, the process must be terminated
460
:error-invalid-address-space 717
463
* While executing a kernel, the device program counter wrapped its address space.
464
* This leaves the process in an inconsistent state and any further CUDA work
465
* will return the same error. To continue using CUDA, the process must be terminated
468
:error-invalid-pc 718
471
* An exception occurred on the device while executing a kernel. Common
472
* causes include dereferencing an invalid device pointer and accessing
473
* out of bounds shared memory. Less common cases can be system specific - more
474
* information about these cases can be found in the system specific user guide.
475
* This leaves the process in an inconsistent state and any further CUDA work
476
* will return the same error. To continue using CUDA, the process must be terminated
479
:error-launch-failed 719
482
* This error indicates that the number of blocks launched per grid for a kernel that was
483
* launched via either ::cuLaunchCooperativeKernel or ::cuLaunchCooperativeKernelMultiDevice
484
* exceeds the maximum number of blocks as allowed by ::cuOccupancyMaxActiveBlocksPerMultiprocessor
485
* or ::cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags times the number of multiprocessors
486
* as specified by the device attribute ::CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT.
488
:error-cooperative-launch-too-large 720
491
* This error indicates that the attempted operation is not permitted.
493
:error-not-permitted 800
496
* This error indicates that the attempted operation is not supported
497
* on the current system or device.
499
:error-not-supported 801
502
* This error indicates that the system is not yet ready to start any CUDA
503
* work. To continue using CUDA, verify the system configuration is in a
504
* valid state and all required driver daemons are actively running.
505
* More information about this error can be found in the system specific
508
:error-system-not-ready 802
511
* This error indicates that there is a mismatch between the versions of
512
* the display driver and the CUDA driver. Refer to the compatibility documentation
513
* for supported versions.
515
:error-system-driver-mismatch 803
518
* This error indicates that the system was upgraded to run with forward compatibility
519
* but the visible hardware detected by CUDA does not support this configuration.
520
* Refer to the compatibility documentation for the supported hardware matrix or ensure
521
* that only supported hardware is visible during initialization via the CUDA_VISIBLE_DEVICES
522
* environment variable.
524
:error-compat-not-supported-on-device 804
527
* This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server.
529
:error-mps-connection-failed 805
532
* This error indicates that the remote procedural call between the MPS server and the MPS client failed.
534
:error-mps-rpc-failure 806
537
* This error indicates that the MPS server is not ready to accept new MPS client requests.
538
* This error can be returned when the MPS server is in the process of recovering from a fatal failure.
540
:error-mps-server-not-ready 807
543
* This error indicates that the hardware resources required to create MPS client have been exhausted.
545
:error-mps-max-clients-reached 808
548
* This error indicates the the hardware resources required to support device connections have been exhausted.
550
:error-mps-max-connections-reached 809
553
* This error indicates that the MPS client has been terminated by the server. To continue using CUDA, the process must be terminated and relaunched.
555
:error-mps-client-terminated 810
558
* This error indicates that the module is using CUDA Dynamic Parallelism, but the current configuration, like MPS, does not support it.
560
:error-cdp-not-supported 811
563
* This error indicates that a module contains an unsupported interaction between different versions of CUDA Dynamic Parallelism.
565
:error-cdp-version-mismatch 812
568
* This error indicates that the operation is not permitted when
569
* the stream is capturing.
571
:error-stream-capture-unsupported 900
574
* This error indicates that the current capture sequence on the stream
575
* has been invalidated due to a previous error.
577
:error-stream-capture-invalidated 901
580
* This error indicates that the operation would have resulted in a merge
581
* of two independent capture sequences.
583
:error-stream-capture-merge 902
586
* This error indicates that the capture was not initiated in this stream.
588
:error-stream-capture-unmatched 903
591
* This error indicates that the capture sequence contains a fork that was
592
* not joined to the primary stream.
594
:error-stream-capture-unjoined 904
597
* This error indicates that a dependency would have been created which
598
* crosses the capture sequence boundary. Only implicit in-stream ordering
599
* dependencies are allowed to cross the boundary.
601
:error-stream-capture-isolation 905
604
* This error indicates a disallowed implicit dependency on a current capture
605
* sequence from cudaStreamLegacy.
607
:error-stream-capture-implicit 906
610
* This error indicates that the operation is not permitted on an event which
611
* was last recorded in a capturing stream.
613
:error-captured-event 907
616
* A stream capture sequence not initiated with the ::CU_STREAM_CAPTURE_MODE_RELAXED
617
* argument to ::cuStreamBeginCapture was passed to ::cuStreamEndCapture in a
620
:error-stream-capture-wrong-thread 908
623
* This error indicates that the timeout specified for the wait operation has lapsed.
628
* This error indicates that the graph update was not performed because it included
629
* changes which violated constraints specific to instantiated graph update.
631
:error-graph-exec-update-failure 910
634
* This indicates that an async error has occurred in a device outside of CUDA.
635
* If CUDA was waiting for an external device's signal before consuming shared data,
636
* the external device signaled an error indicating that the data is not valid for
637
* consumption. This leaves the process in an inconsistent state and any further CUDA
638
* work will return the same error. To continue using CUDA, the process must be
639
* terminated and relaunched.
641
:error-external-device 911
644
* Indicates a kernel launch error due to cluster misconfiguration.
646
:error-invalid-cluster-size 912
649
* Indiciates a function handle is not loaded when calling an API that requires
652
:error-function-not-loaded 913
655
* This error indicates one or more resources passed in are not valid resource
656
* types for the operation.
658
:error-invalid-resource-type 914
661
* This error indicates one or more resources are insufficient or non-applicable for
664
:error-invalid-resource-configuration 915
667
* This indicates that an unknown internal error has occurred.