nvvm#
The cuda.bindings.nvvm Python module wraps the
libNVVM C API.
Functions#
- cuda.bindings.nvvm.version() tuple#
Get the NVVM version.
- Returns:
int: NVVM major version number.
int: NVVM minor version number.
- Return type:
A 2-tuple containing
See also
- cuda.bindings.nvvm.ir_version() tuple#
Get the NVVM IR version.
- Returns:
int: NVVM IR major version number.
int: NVVM IR minor version number.
int: NVVM IR debug metadata major version number.
int: NVVM IR debug metadata minor version number.
- Return type:
A 4-tuple containing
See also
- cuda.bindings.nvvm.create_program() intptr_t#
Create a program, and set the value of its handle to
*prog.- Returns:
NVVM program.
- Return type:
intptr_t
See also
- cuda.bindings.nvvm.add_module_to_program(intptr_t prog, buffer, size_t size, name)#
Add a module level NVVM IR to a program.
- Parameters:
See also
- cuda.bindings.nvvm.lazy_add_module_to_program(intptr_t prog, buffer, size_t size, name)#
Add a module level NVVM IR to a program.
- Parameters:
See also
- cuda.bindings.nvvm.compile_program(intptr_t prog, int num_options, options)#
Compile the NVVM program.
- Parameters:
See also
- cuda.bindings.nvvm.verify_program(intptr_t prog, int num_options, options)#
Verify the NVVM program.
- Parameters:
See also
- cuda.bindings.nvvm.get_compiled_result_size(intptr_t prog) size_t#
Get the size of the compiled result.
- Parameters:
prog (intptr_t) – NVVM program.
- Returns:
Size of the compiled result (including the trailing NULL).
- Return type:
size_t
See also
- cuda.bindings.nvvm.get_compiled_result(intptr_t prog, buffer)#
Get the compiled result.
- Parameters:
prog (intptr_t) – NVVM program.
buffer (bytes) – Compiled result.
See also
- cuda.bindings.nvvm.get_program_log_size(intptr_t prog) size_t#
Get the Size of Compiler/Verifier Message.
- Parameters:
prog (intptr_t) – NVVM program.
- Returns:
Size of the compilation/verification log (including the trailing NULL).
- Return type:
size_t
See also
Types#
- class cuda.bindings.nvvm.Result(value: int)#
NVVM API call result code.
See
nvvmResult.- SUCCESS = <Result.SUCCESS: 0>#
- ERROR_OUT_OF_MEMORY = <Result.ERROR_OUT_OF_MEMORY: 1>#
- ERROR_PROGRAM_CREATION_FAILURE = <Result.ERROR_PROGRAM_CREATION_FAILURE: 2>#
- ERROR_IR_VERSION_MISMATCH = <Result.ERROR_IR_VERSION_MISMATCH: 3>#
- ERROR_INVALID_INPUT = <Result.ERROR_INVALID_INPUT: 4>#
- ERROR_INVALID_PROGRAM = <Result.ERROR_INVALID_PROGRAM: 5>#
- ERROR_INVALID_IR = <Result.ERROR_INVALID_IR: 6>#
- ERROR_INVALID_OPTION = <Result.ERROR_INVALID_OPTION: 7>#
- ERROR_NO_MODULE_IN_PROGRAM = <Result.ERROR_NO_MODULE_IN_PROGRAM: 8>#
- ERROR_COMPILATION = <Result.ERROR_COMPILATION: 9>#
- ERROR_CANCELLED = <Result.ERROR_CANCELLED: 10>#