Skip to main content

Module tensor_core

Module tensor_core 

Source
Expand description

Unified tensor operations and device management Core Tensor Abstraction

This module provides the foundational tensor abstraction that unifies all tensor operations across CPU, GPU, and different data formats.

Uses Candle (HuggingFace’s Rust ML framework) as the computational backend.

Modules§

ops_fn
Convenience functions for tensor operations

Structs§

CandleStorage
Candle-backed tensor storage - the primary storage implementation
CpuStorage
CPU tensor storage implementation
CpuTensorOpsImpl
CPU implementation of tensor operations
GpuStorage
GPU tensor storage implementation (legacy - kept for compatibility)
GpuTensorOpsImpl
Basic GPU implementation of tensor operations
Tensor
Core tensor abstraction - the single source of truth for all tensor operations
TensorDispatcher
Tensor operation dispatcher - automatically selects CPU/GPU implementation

Enums§

DataType
Data types supported by tensors
Device
Device abstraction

Traits§

TensorOps
Core tensor operations trait - device-agnostic interface
TensorStorage
Tensor storage trait - abstracts how data is actually stored

Functions§

ops
Get global tensor operations