cuda.bindings._v2.driver.link_create_v2#
- cuda.bindings._v2.driver.link_create_v2(options, option_values) intptr_t#
Creates a pending JIT linker invocation.
If the call is successful, the caller owns the returned
CUlinkState, which should eventually be destroyed withlink_destroy(). The device code machine size (32 or 64 bit) will match the calling application. Both linker and compiler options may be specified. Compiler options will be applied to inputs to this linker action which must be compiled from PTX. The optionsCU_JIT_WALL_TIME,CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, andCU_JIT_ERROR_LOG_BUFFER_SIZE_BYTESwill accumulate data until theCUlinkStateis destroyed. The data passed in viacuLinkAddDataandcuLinkAddFilewill be treated as relocatable (-rdc=true to nvcc) when linking the final cubin duringcuLinkCompleteand will have similar consequences as offline relocatable device code linking. The option values are copied, and the copy is kept until theCUlinkStateis destroyed, sooption_valuesmay be a temporary. The buffers that the values point to (for example, a log buffer) are not copied, and must remain valid for the life of theCUlinkState. The values that the driver writes back (for example, the accumulated log sizes) are not returned.- Parameters:
options (object) –
Array of linker and compiler options. It must be:
a Python sequence of
JitOption, orNonefor NULL.
option_values (object) –
Array of option values, each cast to void *, with the same length as
options. It must be:a Python sequence of
ints (as pointer addresses), orNonefor NULL.
- Returns:
- On success, this will contain a
CUlinkStateto specify and complete this action.
- On success, this will contain a
- Return type:
intptr_t
Note
For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted.
See also
cuLinkCreate_v2