nvRTC Interfaces.
nvRTC is loaded at runtime via dynamic loading due to explicit cuda_driver linking by cmake.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| procedure(nvrtcCreateProgram_interface), | public, | pointer | :: | nvrtcCreateProgram |
Fortran pointer to the nvrtcCreateProgram function |
||
| procedure(nvrtcDestroyProgram_interface), | public, | pointer | :: | nvrtcDestroyProgram |
Fortran pointer to the nvrtcDestroyProgram function |
||
| procedure(nvrtcCompileProgram_interface), | public, | pointer | :: | nvrtcCompileProgram |
Fortran pointer to the nvrtcCompileProgram function |
||
| procedure(nvrtcGetProgramLogSize_interface), | public, | pointer | :: | nvrtcGetProgramLogSize |
Fortran pointer to the nvrtcGetProgramLogSize function |
||
| procedure(nvrtcGetProgramLog_interface), | public, | pointer | :: | nvrtcGetProgramLog |
Fortran pointer to the nvrtcGetProgramLog function |
||
| procedure(nvrtcGetCUBINSize_interface), | public, | pointer | :: | nvrtcGetCUBINSize |
Fortran pointer to the nvrtcGetCUBINSize function |
||
| procedure(nvrtcGetCUBIN_interface), | public, | pointer | :: | nvrtcGetCUBIN |
Fortran pointer to the nvrtcGetCUBIN function |
||
| procedure(nvrtcGetLoweredName_interface), | public, | pointer | :: | nvrtcGetLoweredName |
Fortran pointer to the nvrtcGetLoweredName function |
||
| procedure(nvrtcAddNameExpression_interface), | public, | pointer | :: | nvrtcAddNameExpression |
Fortran pointer to the nvrtcAddNameExpression function |
||
| integer(kind=int32), | private, | parameter | :: | N_FUNCTIONS_TO_LOAD | = | 10 |
Number of functions to load from nvrtc library |
| logical, | private, | save | :: | is_loaded | = | .false. |
Flag indicating whether the library is loaded |
| type(c_ptr), | private, | save | :: | libnvrtc |
Handle to the loaded library |
||
| type(c_funptr), | private, | save | :: | nvrtcFunctions(N_FUNCTIONS_TO_LOAD) |
Array of pointers to the nvRTC functions |
||
| procedure(nvrtcGetErrorString_interface), | private, | pointer | :: | nvrtcGetErrorString_c |
Fortran pointer to the nvrtcGetErrorString function |
Helper function that returns a string describing the given nvrtcResult code For unrecognized enumeration values, it returns “NVRTC_ERROR unknown”
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | error_code |
CUDA Runtime Compilation API result code. |
Pointer to C string
Creates an instance of nvrtcProgram with the given input parameters, and sets the output parameter prog with it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(nvrtcProgram) | :: | prog |
CUDA Runtime Compilation program. |
|||
| character(len=c_char) | :: | src(*) |
CUDA program source. |
|||
| character(len=c_char) | :: | name(*) |
CUDA program name. |
|||
| integer(kind=c_int), | value | :: | numHeaders |
Number of headers used. Must be greater than or equal to 0. |
||
| type(c_ptr), | value | :: | headers |
Sources of the headers |
||
| type(c_ptr), | value | :: | includeNames |
Name of each header by which they can be included in the CUDA program source |
The enumerated type nvrtcResult defines API call result codes.
Destroys the given program.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(nvrtcProgram) | :: | prog |
CUDA Runtime Compilation program. |
The enumerated type nvrtcResult defines API call result codes.
Compiles the given program.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(nvrtcProgram), | value | :: | prog |
CUDA Runtime Compilation program. |
||
| integer(kind=c_int), | value | :: | numOptions |
Number of compiler options passed. |
||
| type(c_ptr) | :: | options(*) |
Compiler options in the form of C string array |
The enumerated type nvrtcResult defines API call result codes.
Sets the value of logSizeRet with the size of the log generated by the previous compilation of prog.
The log is a null-terminated string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(nvrtcProgram), | value | :: | prog |
CUDA Runtime Compilation program. |
||
| integer(kind=c_size_t) | :: | logSizeRet |
Size of the compilation log. |
The enumerated type nvrtcResult defines API call result codes.
Stores the log generated by the previous compilation of prog in the memory pointed by log
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(nvrtcProgram), | value | :: | prog |
CUDA Runtime Compilation program. |
||
| type(c_ptr), | value | :: | log |
Compilation log. |
The enumerated type nvrtcResult defines API call result codes.
Sets the value of cubinSizeRet with the size of the cubin generated by the previous compilation of prog.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(nvrtcProgram), | value | :: | prog |
CUDA Runtime Compilation program. |
||
| integer(kind=c_size_t) | :: | cubinSizeRet |
Size of the generated cubin. |
The enumerated type nvrtcResult defines API call result codes.
Stores the cubin generated by the previous compilation of prog in the memory pointed by cubin.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(nvrtcProgram), | value | :: | prog |
CUDA Runtime Compilation program. |
||
| type(c_ptr), | value | :: | cubin |
Compiled and assembled result. |
The enumerated type nvrtcResult defines API call result codes.
Extracts the lowered (mangled) name for a global function or device/constant variable, and updates *lowered_name to point to it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(nvrtcProgram), | value | :: | prog |
CUDA Runtime Compilation program. |
||
| character(len=c_char) | :: | name_expression(*) |
Name expression. |
|||
| type(c_ptr) | :: | lowered_name |
Mangled name. |
The enumerated type nvrtcResult defines API call result codes.
Notes the given name expression denoting the address of a global function or device/constant variable.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(nvrtcProgram), | value | :: | prog |
CUDA Runtime Compilation program. |
||
| character(len=c_char) | :: | name_expression(*) |
Name expression. |
The enumerated type nvrtcResult defines API call result codes.
nvrtcProgram is the unit of compilation, and an opaque handle for a program.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(c_ptr), | public | :: | cptr |
Actual pointer |
Helper function that returns a string describing the given nvrtcResult code For unrecognized enumeration values, it returns “NVRTC_ERROR unknown”
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | intent(in) | :: | error_code |
CUDA Runtime Compilation API result code. |
Result string
Dynamically loads nvRTC library and its functions
Error code