GeneralRulesΒΆ

General CUDA rules

Nested Rules

CUDA-1.1

Use CUDA after host program initiation and before host program termination

CUDA-1.2

Synchronize with all devices before termination

CUDA-1.3

Check for errors after calling any CUDA library interface

CUDA-1.4

Check for errors after launching a kernel by calling cudaGetLastError

CUDA-1.5

Treat CUdevice objects as handles not integers

CUDA-1.6

A call to fork must be immediately followed to a call to exec

CUDA-1.7

Be consistent with execution space and kernel function specifiers across all declarations

CUDA-1.8

Kernel parameters passed by value should be trivial

CUDA-1.9

Kernel parameters passed by reference should be managed storage duration objects

CUDA-1.10

Never use CUDA_ARCH to guard CUDA declarations

CUDA-1.11

Do not modify CUDA language specific macro names

CUDA-1.12

Constant memory objects shall not be modified from the device program

CUDA-1.13

No thread_local storage duration objects in device code

CUDA-1.14

A implicit thread block synchronization function should be called by all active threads

Options