Public Member Functions | |
def | test_cuda_array_interface (self) |
def | test_array_adaptor (self) |
def | test_conversion_errors (self) |
def | test_active_device (self) |
Definition at line 20 of file test_numba_integration.py.
def test_numba_integration.TestNumbaIntegration.test_active_device | ( | self | ) |
'as_cuda_array' tensor device must match active numba context.
Definition at line 237 of file test_numba_integration.py.
def test_numba_integration.TestNumbaIntegration.test_array_adaptor | ( | self | ) |
Torch __cuda_array_adaptor__ exposes tensor data to numba.cuda.
Definition at line 105 of file test_numba_integration.py.
def test_numba_integration.TestNumbaIntegration.test_conversion_errors | ( | self | ) |
Numba properly detects array interface for tensor.Tensor variants.
Definition at line 172 of file test_numba_integration.py.
def test_numba_integration.TestNumbaIntegration.test_cuda_array_interface | ( | self | ) |
torch.Tensor exposes __cuda_array_interface__ for cuda tensors. An object t is considered a cuda-tensor if: hasattr(t, '__cuda_array_interface__') A cuda-tensor provides a tensor description dict: shape: (integer, ...) Tensor shape. strides: (integer, ...) Tensor strides, in bytes. typestr: (str) A numpy-style typestr. data: (int, boolean) A (data_ptr, read-only) tuple. version: (int) Version 0 See: https://numba.pydata.org/numba-doc/latest/cuda/cuda_array_interface.html
Definition at line 23 of file test_numba_integration.py.