Skip to main content

cuLibraryLoadFromFile

Function cuLibraryLoadFromFile 

Source
pub unsafe extern "C" fn cuLibraryLoadFromFile(
    library: *mut CUlibrary,
    fileName: *const c_char,
    jitOptions: *mut CUjit_option,
    jitOptionsValues: *mut *mut c_void,
    numJitOptions: c_uint,
    libraryOptions: *mut CUlibraryOption,
    libraryOptionValues: *mut *mut c_void,
    numLibraryOptions: c_uint,
) -> CUresult
Expand description

Load a library with specified file and options.

Takes a pointer code and loads the corresponding library library based on the application defined library loading mode:

These environment variables are described in the CUDA programming guide under the “CUDA environment variables” section.

The file should be a cubin file as output by nvcc, or a PTX file either as output by nvcc or handwritten, or a fatbin file as output by nvcc or hand-written, or Tile IR file. A fatbin should also contain relocatable code when doing separate compilation.

Options are passed as an array via jitOptions and any corresponding parameters are passed in jitOptionsValues. The number of total options is supplied via numJitOptions. Any outputs will be returned via jitOptionsValues.

Library load options are passed as an array via libraryOptions and any corresponding parameters are passed in libraryOptionValues. The number of total library load options is supplied via numLibraryOptions.

§Parameters

  • library: Returned library.
  • fileName: File to load from.
  • jitOptions: Options for JIT.
  • jitOptionsValues: Option values for JIT.
  • numJitOptions: Number of options.
  • libraryOptions: Options for loading.
  • libraryOptionValues: Option values for loading.
  • numLibraryOptions: Number of options for loading.