compile_matmul_prolog#

nvmath.sparse.compile_matmul_prolog(
prolog,
*,
operand_label,
dtype,
compute_capability=None,
)[source]#

Compile a unary Python function with argument type dtype returning a value of type dtype to device code.

Parameters:
  • prolog – The unary Python function to compile to device code.

  • operand_label – The operand to which the prolog applies (“a”, “b”).

  • dtype – The dtype of the prolog’s argument. Any scalar Numba type can be provided.

  • compute_capability – The target compute capability, specified as a string ('80', '89', …). The default is the compute capability of the current device.

Returns:

The compiled device code as a bytes object.