cuda.bindings._v2.driver.JitOption#

class cuda.bindings._v2.driver.JitOption(value: int)#

Online compiler and linker options

See CUjit_option.

MAX_REGISTERS: 0

Max number of registers that a thread may use. Option type: unsigned int Applies to: compiler only

THREADS_PER_BLOCK: 1

IN: Specifies minimum number of threads per block to target compilation for OUT: Returns the number of threads the compiler actually targeted. This restricts the resource utilization of the compiler (e.g. max registers) such that a block with the given number of threads should be able to launch based on register limitations. Note, this option does not currently take into account any other resource limitations, such as shared memory utilization. Cannot be combined with CU_JIT_TARGET. Option type: unsigned int Applies to: compiler only

WALL_TIME: 2

Overwrites the option value with the total wall clock time, in milliseconds, spent in the compiler and linker Option type: float Applies to: compiler and linker

INFO_LOG_BUFFER: 3

Pointer to a buffer in which to print any log messages that are informational in nature (the buffer size is specified via option CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES) Option type: char * Applies to: compiler and linker

INFO_LOG_BUFFER_SIZE_BYTES: 4

IN: Log buffer size in bytes. Log messages will be capped at this size (including null terminator) OUT: Amount of log buffer filled with messages Option type: unsigned int Applies to: compiler and linker

ERROR_LOG_BUFFER: 5

Pointer to a buffer in which to print any log messages that reflect errors (the buffer size is specified via option CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES) Option type: char * Applies to: compiler and linker

ERROR_LOG_BUFFER_SIZE_BYTES: 6

IN: Log buffer size in bytes. Log messages will be capped at this size (including null terminator) OUT: Amount of log buffer filled with messages Option type: unsigned int Applies to: compiler and linker

OPTIMIZATION_LEVEL: 7

Level of optimizations to apply to generated code (0 - 4), with 4 being the default and highest level of optimizations. Option type: unsigned int Applies to: compiler only

TARGET_FROM_CUCONTEXT: 8

No option value required. Determines the target based on the current attached context (default) Option type: No option value needed Applies to: compiler and linker

TARGET: 9

Target is chosen based on supplied CUjit_target. Cannot be combined with CU_JIT_THREADS_PER_BLOCK. Option type: unsigned int for enumerated type CUjit_target Applies to: compiler and linker

FALLBACK_STRATEGY: 10

Specifies choice of fallback strategy if matching cubin is not found. Choice is based on supplied CUjit_fallback. This option cannot be used with cuLink* APIs as the linker requires exact matches. Option type: unsigned int for enumerated type CUjit_fallback Applies to: compiler only

GENERATE_DEBUG_INFO: 11

Specifies whether to create debug information in output (-g) (0: false, default) Option type: int Applies to: compiler and linker

LOG_VERBOSE: 12

Generate verbose log messages (0: false, default) Option type: int Applies to: compiler and linker

GENERATE_LINE_INFO: 13

Generate line number information (-lineinfo) (0: false, default) Option type: int Applies to: compiler only

CACHE_MODE: 14

Specifies whether to enable caching explicitly (-dlcm) Choice is based on supplied CUjit_cacheMode_enum. Option type: unsigned int for enumerated type CUjit_cacheMode_enum Applies to: compiler only

NEW_SM3X_OPT: 15

[Deprecated]

FAST_COMPILE: 16

This jit option is used for internal purpose only.

GLOBAL_SYMBOL_NAMES: 17

Array of device symbol names that will be relocated to the corresponding host addresses stored in CU_JIT_GLOBAL_SYMBOL_ADDRESSES. Must contain CU_JIT_GLOBAL_SYMBOL_COUNT entries. When loading a device module, driver will relocate all encountered unresolved symbols to the host addresses. It is only allowed to register symbols that correspond to unresolved global variables. It is illegal to register the same device symbol at multiple addresses. Option type: const char ** Applies to: dynamic linker only

GLOBAL_SYMBOL_ADDRESSES: 18

Array of host addresses that will be used to relocate corresponding device symbols stored in CU_JIT_GLOBAL_SYMBOL_NAMES. Must contain CU_JIT_GLOBAL_SYMBOL_COUNT entries. Option type: void ** Applies to: dynamic linker only

GLOBAL_SYMBOL_COUNT: 19

Number of entries in CU_JIT_GLOBAL_SYMBOL_NAMES and CU_JIT_GLOBAL_SYMBOL_ADDRESSES arrays. Option type: unsigned int Applies to: dynamic linker only

LTO: 20

[Deprecated] Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

FTZ: 21

[Deprecated] Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

PREC_DIV: 22

[Deprecated] Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

PREC_SQRT: 23

[Deprecated] Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

FMA: 24

[Deprecated] Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

REFERENCED_KERNEL_NAMES: 25

[Deprecated] Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

REFERENCED_KERNEL_COUNT: 26

[Deprecated] Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

REFERENCED_VARIABLE_NAMES: 27

[Deprecated] Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

REFERENCED_VARIABLE_COUNT: 28

[Deprecated] Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

OPTIMIZE_UNUSED_DEVICE_VARIABLES: 29

[Deprecated] Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

POSITION_INDEPENDENT_CODE: 30

Generate position independent code (0: false) Option type: int Applies to: compiler only

MIN_CTA_PER_SM: 31

This option hints to the JIT compiler the minimum number of CTAs from the kernel’s grid to be mapped to a SM. This option is ignored when used together with CU_JIT_MAX_REGISTERS or CU_JIT_THREADS_PER_BLOCK. Optimizations based on this option need CU_JIT_MAX_THREADS_PER_BLOCK to be specified as well. For kernels already using PTX directive .minnctapersm, this option will be ignored by default. Use CU_JIT_OVERRIDE_DIRECTIVE_VALUES to let this option take precedence over the PTX directive. Option type: unsigned int Applies to: compiler only

MAX_THREADS_PER_BLOCK: 32

Maximum number threads in a thread block, computed as the product of the maximum extent specifed for each dimension of the block. This limit is guaranteed not to be exeeded in any invocation of the kernel. Exceeding the the maximum number of threads results in runtime error or kernel launch failure. For kernels already using PTX directive .maxntid, this option will be ignored by default. Use CU_JIT_OVERRIDE_DIRECTIVE_VALUES to let this option take precedence over the PTX directive. Option type: int Applies to: compiler only

OVERRIDE_DIRECTIVE_VALUES: 33

This option lets the values specified using CU_JIT_MAX_REGISTERS, CU_JIT_THREADS_PER_BLOCK, CU_JIT_MAX_THREADS_PER_BLOCK and CU_JIT_MIN_CTA_PER_SM take precedence over any PTX directives. (0: Disable, default; 1: Enable) Option type: int Applies to: compiler only

SPLIT_COMPILE: 34

This option specifies the maximum number of concurrent threads to use when running compiler optimizations. If the specified value is 1, the option will be ignored. If the specified value is 0, the number of threads will match the number of CPUs on the underlying machine. Otherwise, if the option is N, then up to N threads will be used. Option type: unsigned int Applies to: compiler only

BINARY_LOADER_THREAD_COUNT: 35

This option specifies the maximum number of concurrent threads to use when compiling device code. If the specified value is 1, the option will be ignored. If the specified value is 0, the number of threads will match the number of CPUs on the underlying machine. Otherwise, if the option is N, then up to N threads will be used. This option is ignored if the env var CUDA_BINARY_LOADER_THREAD_COUNT is set. Option type: unsigned int Applies to: compiler and linker

NUM_OPTIONS: 36