Caffe2 - Python API
A deep learning, cross platform ML framework
Public Member Functions | List of all members
test_numba_integration.TestNumbaIntegration Class Reference
Inheritance diagram for test_numba_integration.TestNumbaIntegration:

Public Member Functions

def test_cuda_array_interface (self)
def test_array_adaptor (self)
def test_conversion_errors (self)
def test_active_device (self)

Detailed Description

Definition at line 20 of file

Member Function Documentation

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

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

def test_numba_integration.TestNumbaIntegration.test_conversion_errors (   self)
Numba properly detects array interface for tensor.Tensor variants.

Definition at line 172 of file

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


Definition at line 23 of file

The documentation for this class was generated from the following file: