Device API utilities (nvmath.device)#

Overview#

nvmath-python provides the following device-side utilities.

API Reference#

current_device_lto()

A helper function to get the default code type for link time optimization (LTO) on the current device.

float16x2(x, y)

Create a Numba compliant vector object for float16 with vector length 2.

float16x4(x, y, z, w)

Create a Numba compliant vector object for float16 with vector length 4.

float32x2(x, y)

Create a Numba compliant vector object for float32 with vector length 2.

float64x2(x, y)

Create a Numba compliant vector object for float64 with vector length 2.

float16x2_type

A Numba compliant vector type object for float16 with vector length 2

float16x4_type

A Numba compliant vector type object for float16 with vector length 4

float32x2_type

A Numba compliant vector type object for float32 with vector length 2

float64x2_type

A Numba compliant vector type object for float64 with vector length 2

ISAVersion(major, minor)

A namedtuple class that encapsulates the code version.

Code(code_type, isa_version, data)

A namedtuple class that encapsulates code type, version, and buffer.

CodeType(kind, cc)

A namedtuple class that encapsulates code kind and compute capability.

ComputeCapability(major, minor)

A namedtuple class that encapsulates the major and minor compute capability.

CodeType(kind, cc)

A namedtuple class that encapsulates code kind and compute capability.

Symbol(variant, name)

A namedtuple class that encapsulates a device function symbol and which API it maps to.

Dim3([x, y, z])

A namedtuple class that encapsulates the dimensions for grids and blocks.