API Reference extorch v0.1.0-pre0
modules
Modules
The ExTorch
namespace contains data structures for multi-dimensional tensors and mathematical operations over these are defined.
Additionally, it provides many utilities for efficient serializing of Tensors and arbitrary types, and other useful utilities.
A torch.dtype
is an object that represents the data type of a torch.Tensor
.
ExTorch has twelve different data types
Public API documentation for DelegateWithDocs
. This module is based on
https://github.com/danielberkompas/delegate_with_docs
A torch.device is an object representing the device on which a torch.Tensor
is or will be allocated. The torch.device contains a device type ('cpu' or 'cuda')
and optional device ordinal for the device type. If the device ordinal is not
present, this object will always represent the current device for the device type,
even after torch.cuda.set_device()
is called; e.g., a torch.Tensor constructed
with device 'cuda' is equivalent to 'cuda:X' where X is the result of
torch.cuda.current_device()
.
An index is an object that can act as an accessor to a ExTorch.Tensor
.
ExTorch has five kinds of indices
Slice index definition.
A torch.layout
is an object that represents the memory layout of a torch.Tensor
.
Currently, we support torch.strided
(dense Tensors) and have beta support for
torch.sparse_coo
(sparse COO Tensors).
A torch.memory_format
is an object representing the memory format on which
a torch.Tensor
is or will be allocated.
Utilities used to define a module mixin that inherits documentation and specs.
The ExTorch.Native
module contains all NIF declarations to call libtorch in C++.
Conveniences for declaring native calls to a library in Rustler.
General purpose macros to automatically generate binding declarations and calls for both ExTorch callable functions and Rustler signature calls to the NIF library.
An ExTorch.Tensor
is a multi-dimensional matrix containing elements of a single data type.
The ExTorch.Tensor.Options
struct defines the creation parameters of a tensor.
Struct used to represent a list with elements or lists of elements.
General type hierarchy comparison utils