Loading...
Searching...
No Matches
tensor_types.h File Reference
#include "opennn/core/opennn_types.h"
#include "opennn/core/configuration.h"
#include "opennn/core/device_backend.h"
#include <cstdio>

Go to the source code of this file.

Classes

struct  opennn::TypeInfo< Type::FP32 >
 
struct  opennn::TypeInfo< Type::BF16 >
 
struct  opennn::TypeInfo< Type::INT8 >
 
struct  opennn::Shape
 
struct  opennn::TensorSpec
 
struct  opennn::Buffer
 
struct  opennn::TensorView
 

Namespaces

namespace  opennn
 
namespace  opennn::detail
 

Typedefs

template<typename T, size_t N>
using opennn::array = Eigen::array<T, N>
 

Enumerations

enum class  opennn::ColumnContiguity { opennn::Unknown , opennn::NonContiguous , opennn::Contiguous }
 

Functions

template<Type... Supported, typename F>
void opennn::visit_type (Type t, F &&f)
 
template<Type... Supported, typename F>
void opennn::visit_type_pair (Type t_in, Type t_out, F &&f)
 
template<typename F>
auto opennn::with_type_info (Type type, const char *caller, F &&f)
 
DnnDataType opennn::to_cudnn (Type type)
 
DeviceDataType opennn::to_cuda (Type type)
 
Index opennn::type_bytes (Type type)
 
int opennn::to_int (Index value)
 
float opennn::to_type (Index value)
 
Index opennn::detail::checked_index_add (Index left, Index right, string_view operation)
 
Index opennn::detail::checked_index_multiply (Index left, Index right, string_view operation)
 
template<typename Range, typename Projection>
Index opennn::detail::checked_index_sum (const Range &values, Projection projection, string_view operation)
 
Index opennn::align_up (Index value, Index alignment)
 
Index opennn::ceil_div (Index value, Index divisor)
 
Index opennn::get_aligned_size (Index size)
 
Index opennn::get_aligned_bytes (Index n_bytes)
 
Index opennn::get_aligned_bytes (Index count, Type dtype)
 
bool opennn::is_aligned (const void *ptr)
 
Index opennn::get_aligned_size (const vector< TensorSpec > &specs)
 
Index opennn::get_aligned_size (const vector< vector< TensorSpec > > &specs)
 
Index opennn::get_aligned_bytes (const TensorSpec &spec)
 
Index opennn::get_aligned_bytes (const vector< TensorSpec > &specs)
 
Index opennn::get_aligned_bytes (const vector< vector< TensorSpec > > &specs)
 
Index opennn::get_aligned_bytes (const vector< Shape > &shapes, Type dtype)
 
Index opennn::get_aligned_bytes (const vector< TensorSpec > &specs, Type dtype)
 
Index opennn::get_aligned_bytes (const vector< vector< TensorSpec > > &specs, Type dtype)
 
TensorView & opennn::slot_or (vector< TensorView > &views, const vector< size_t > &slot_indices, size_t i, TensorView &fallback)
 
string opennn::shape_to_string (const Shape &, const string &=" ")
 
Shape opennn::string_to_shape (const string &, const string &=" ")
 
bool opennn::is_contiguous (const vector< Index > &indices)
 
ColumnContiguity opennn::classify_column_contiguity (const vector< Index > &indices)
 
bool opennn::resolve_column_contiguity (ColumnContiguity column_contiguity, const vector< Index > &indices)
 
void opennn::fill_tensor_data (const MatrixR &, const vector< Index > &, const vector< Index > &, span< float >, ColumnContiguity=ColumnContiguity::Unknown)
 
template<typename... Vs>
size_t opennn::hash_combine (const Vs &... values)
 
void opennn::copy_device_to_host_float (const void *, Type, Index, float *, DeviceStream stream)
 
void opennn::copy_device_to_host_float (const void *, Type, Index, float *, DeviceStream stream, vector< uint16_t > &bf16_staging)
 

Variables

static constexpr Index opennn::ALIGN_BYTES = EIGEN_MAX_ALIGN_BYTES
 
static constexpr Index opennn::ALIGN_ELEMENTS = ALIGN_BYTES / sizeof(float)
 
constexpr BlasComputeType opennn::CUBLAS_COMPUTE_DTYPE = CUBLAS_COMPUTE_32F_FAST_TF32
 
const float opennn::one = 1.0f
 
const float opennn::zero = 0.0f