Compile#
-
class nvmath.
device. random. Compile( - cc: ComputeCapability | None = None,
Compile the random device APIs with the specified compute capability.
The
files
andextension
attributes should be used as the arguments fornumba.cuda.jit()
decorator in Numba kernels which use random device APIs.- Parameters:
cc – (optional) the compute capability specified as an object of type
nvmath.
. If not specified, the default compute capability will be used.device. ComputeCapability
Example
>>> from numba import cuda >>> from nvmath.device import random >>> compiled_apis = random.Compile() >>> @cuda.jit(link=compiled_apis.files, extensions=compiled_apis.extension) ... def kernel(): ... pass # use random device APIs here
Methods
- __init__(
- cc: ComputeCapability | None = None,
Attributes
- extension#
The extension needed to use random device APIs with Numba kernels.
- files#
The data needed to link random device APIs with Numba kernels.