载入中...
搜索中...
未找到
eve::tensor::onnx_detail 命名空间参考

类

struct  Attribute
 Attribute public API. 更多...
 
class  ByteStorage
 ByteStorage public API. 更多...
 
struct  CompiledProgram
 CompiledProgram public API. 更多...
 
class  CompilerQueue
 CompilerQueue public API. 更多...
 
struct  Failure
 Failure public API. 更多...
 
struct  Input
 Input public API. 更多...
 
struct  ModelData
 ModelData public API. 更多...
 
struct  Node
 Node public API. 更多...
 
struct  RuntimeTensor
 RuntimeTensor public API. 更多...
 

函数

bool isSupported (const Node &node)
 True when supported.
 
std::vector< RuntimeTensor > execute (const Node &node, const std::vector< const RuntimeTensor * > &inputs, OnnxCompute *compute=nullptr)
 Execute.
 
std::vector< int32_t > gpuMatmul (OnnxCompute &device, affine::ByteView a, affine::ByteView b, size_t m, size_t k, size_t n, int az, std::span< const int32_t > bz)
 Gpu matmul.
 
std::vector< int32_t > gpuConv (OnnxCompute &device, affine::ByteView x, affine::ByteView w, const affine::ConvShape &s, int xz, std::span< const int32_t > wz)
 Gpu conv.
 
OnnxBuffer enqueueInteger (OnnxCompute &d, const std::string &source, OnnxBuffer a, OnnxBuffer b, std::span< const int32_t > z, size_t size, size_t terms)
 
OnnxBuffer gpuMatmulResident (OnnxCompute &, OnnxBuffer, OnnxBuffer, bool, bool, size_t, size_t, size_t, int, std::span< const int32_t >, size_t bOffset=0)
 Gpu matmul resident.
 
OnnxBuffer gpuConvResident (OnnxCompute &, OnnxBuffer, OnnxBuffer, bool, bool, const affine::ConvShape &, int, std::span< const int32_t >)
 Gpu conv resident.
 
std::optional< std::vector< RuntimeTensor > > executeIndex (const Node &, const std::vector< const RuntimeTensor * > &)
 Execute index.
 
size_t elementSize (OnnxElement e)
 Element size.
 
size_t count (const std::vector< int64_t > &shape)
 Returns the number of count.
 
void validate (const RuntimeTensor &v)
 Validate.
 
template<class T >
T read (const RuntimeTensor &v, size_t i)
 Reads read.
 
template<class T >
RuntimeTensor make (OnnxElement e, std::vector< int64_t > shape, const std::vector< T > &values)
 Make.
 
int64_t integer (const RuntimeTensor &v, size_t i=0)
 Integer.
 
std::vector< float > floats (const RuntimeTensor &v)
 Floats.
 
std::vector< int64_t > ints (const RuntimeTensor &v)
 Ints.
 
int64_t attr (const Node &n, const char *key, int64_t fallback)
 Attr.
 
std::vector< int64_t > attrs (const Node &n, const char *key, std::vector< int64_t > fallback)
 Attrs.
 
const RuntimeTensor & required (const std::vector< const RuntimeTensor * > &in, size_t i)
 Required.
 
int axis (int64_t a, size_t rank)
 Axis.
 
std::vector< int64_t > broadcast (const std::vector< int64_t > &a, const std::vector< int64_t > &b)
 Broadcast.
 
size_t broadcastIndex (size_t i, const std::vector< int64_t > &shape, const std::vector< int64_t > &output)
 Broadcast index.
 
std::optional< RuntimeTensor > executeShape (const Node &, const std::vector< const RuntimeTensor * > &)
 Execute shape.
 
RuntimeTensor dispatchFloat (OnnxCompute &, const std::vector< const RuntimeTensor * > &, const std::vector< int64_t > &, const std::string &, size_t work=0)
 Dispatches float.
 
std::optional< RuntimeTensor > executeMisc (const Node &, const std::vector< const RuntimeTensor * > &, OnnxCompute *)
 Execute misc.
 
std::optional< RuntimeTensor > executeNeural (const Node &, const std::vector< const RuntimeTensor * > &, OnnxCompute *)
 Execute neural.
 
std::optional< RuntimeTensor > executeNumeric (const Node &, const std::vector< const RuntimeTensor * > &, OnnxCompute *)
 Execute numeric.
 
std::vector< OnnxNamedTensor > evaluate (const ModelData &, std::span< const OnnxNamedTensor >, const std::vector< std::string > &, OnnxCompute *, OnnxRunOptions options)
 Evaluate.
 
ModelData parse (std::span< const uint8_t > bytes)
 Parse.
 
std::vector< RuntimeTensor > executeQuant (const Node &node, const std::vector< const RuntimeTensor * > &inputs, OnnxCompute *compute=nullptr)
 Execute quant.
 
std::vector< RuntimeTensor > executeQuantLstm (const Node &node, const std::vector< const RuntimeTensor * > &inputs, OnnxCompute *compute=nullptr)
 Execute quant lstm.
 

函数说明

◆ attr()

int64_t eve::tensor::onnx_detail::attr ( const Node &  n,
const char *  key,
int64_t  fallback 
)
inline

Attr.

在文件 OnnxInternal.h 第 127 行定义.

引用了 key , 以及 n.

被这些函数引用 execute(), executeIndex(), executeMisc(), executeNeural(), executeNumeric(), executeQuant(), executeQuantLstm() , 以及 executeShape().

◆ attrs()

std::vector< int64_t > eve::tensor::onnx_detail::attrs ( const Node &  n,
const char *  key,
std::vector< int64_t >  fallback 
)
inline

Attrs.

在文件 OnnxInternal.h 第 132 行定义.

引用了 key , 以及 n.

被这些函数引用 execute(), executeNeural(), executeNumeric() , 以及 executeQuant().

◆ axis()

int eve::tensor::onnx_detail::axis ( int64_t  a,
size_t  rank 
)
inline

Axis.

在文件 OnnxInternal.h 第 142 行定义.

引用了 a.

被这些函数引用 execute(), executeIndex(), executeMisc(), executeNumeric(), executeQuant() , 以及 executeShape().

◆ broadcast()

std::vector< int64_t > eve::tensor::onnx_detail::broadcast ( const std::vector< int64_t > &  a,
const std::vector< int64_t > &  b 
)

Broadcast.

在文件 OnnxShapeOps.cpp 第 8 行定义.

引用了 a, b, count, x , 以及 y.

被这些函数引用 executeNumeric() , 以及 executeShape().

◆ broadcastIndex()

size_t eve::tensor::onnx_detail::broadcastIndex ( size_t  i,
const std::vector< int64_t > &  shape,
const std::vector< int64_t > &  output 
)

Broadcast index.

在文件 OnnxShapeOps.cpp 第 18 行定义.

引用了 d, index, output , 以及 shape.

被这些函数引用 executeNumeric() , 以及 executeShape().

◆ count()

size_t eve::tensor::onnx_detail::count ( const std::vector< int64_t > &  shape)
inline

Returns the number of count.

Failure.

在文件 OnnxInternal.h 第 66 行定义.

引用了 d, n, shape , 以及 eve::Unsupported.

◆ dispatchFloat()

RuntimeTensor eve::tensor::onnx_detail::dispatchFloat ( OnnxCompute &  compute,
const std::vector< const RuntimeTensor * > &  inputs,
const std::vector< int64_t > &  shape,
const std::string &  body,
size_t  work = 0 
)

◆ elementSize()

size_t eve::tensor::onnx_detail::elementSize ( OnnxElement  e)
inline

◆ enqueueInteger()

OnnxBuffer eve::tensor::onnx_detail::enqueueInteger ( OnnxCompute &  d,
const std::string &  source,
OnnxBuffer  a,
OnnxBuffer  b,
std::span< const int32_t >  z,
size_t  size,
size_t  terms 
)

在文件 OnnxGpuKernels.cpp 第 52 行定义.

引用了 a, b, bytes, d, host, inputs, r, size, source, eve::Unsupported , 以及 z.

被这些函数引用 gpuConvResident() , 以及 gpuMatmulResident().

◆ evaluate()

std::vector< OnnxNamedTensor > eve::tensor::onnx_detail::evaluate ( const ModelData &  model,
std::span< const OnnxNamedTensor >  feeds,
const std::vector< std::string > &  requested,
OnnxCompute *  compute,
OnnxRunOptions  options 
)

Evaluate.

在文件 OnnxRuntime.cpp 第 343 行定义.

引用了 bytes, c, compute, f, inputs, model, options, run , 以及 t.

◆ execute()

◆ executeIndex()

std::optional< std::vector< RuntimeTensor > > eve::tensor::onnx_detail::executeIndex ( const Node &  n,
const std::vector< const RuntimeTensor * > &  in 
)

◆ executeMisc()

std::optional< RuntimeTensor > eve::tensor::onnx_detail::executeMisc ( const Node &  n,
const std::vector< const RuntimeTensor * > &  in,
OnnxCompute *  compute 
)

◆ executeNeural()

std::optional< RuntimeTensor > eve::tensor::onnx_detail::executeNeural ( const Node &  n,
const std::vector< const RuntimeTensor * > &  in,
OnnxCompute *  compute 
)

◆ executeNumeric()

std::optional< RuntimeTensor > eve::tensor::onnx_detail::executeNumeric ( const Node &  n,
const std::vector< const RuntimeTensor * > &  in,
OnnxCompute *  compute 
)

◆ executeQuant()

◆ executeQuantLstm()

std::vector< RuntimeTensor > eve::tensor::onnx_detail::executeQuantLstm ( const Node &  node,
const std::vector< const RuntimeTensor * > &  inputs,
OnnxCompute *  compute = nullptr 
)

Execute quant lstm.

在文件 OnnxLstm.cpp 第 78 行定义.

引用了 attr(), b, c, clip, compute, count, d, direction, eve::tensor::affine::dynamicQuantize(), element, f, eve::tensor::Float32, floats(), g, gates, h, input, eve::tensor::Int32, ints(), make(), n, p, projected, qx, r, required, shape, state, step, t, time, w, x, y , 以及 z.

被这些函数引用 execute().

◆ executeShape()

std::optional< RuntimeTensor > eve::tensor::onnx_detail::executeShape ( const Node &  n,
const std::vector< const RuntimeTensor * > &  in 
)

◆ floats()

std::vector< float > eve::tensor::onnx_detail::floats ( const RuntimeTensor &  v)
inline

Floats.

Out.

在文件 OnnxInternal.h 第 112 行定义.

引用了 count, eve::tensor::Float32 , 以及 v.

被这些函数引用 execute(), executeMisc(), executeNeural(), executeNumeric(), executeQuant() , 以及 executeQuantLstm().

◆ gpuConv()

std::vector< int32_t > eve::tensor::onnx_detail::gpuConv ( OnnxCompute &  d,
affine::ByteView  x,
affine::ByteView  w,
const affine::ConvShape &  c,
int  xz,
std::span< const int32_t >  wz 
)

Gpu conv.

在文件 OnnxGpuKernels.cpp 第 46 行定义.

引用了 c, d, gpuConvResident(), w, wz , 以及 x.

被这些函数引用 eve::tensor::affine::conv().

◆ gpuConvResident()

OnnxBuffer eve::tensor::onnx_detail::gpuConvResident ( OnnxCompute &  d,
OnnxBuffer  x,
OnnxBuffer  w,
bool  xs,
bool  ws,
const affine::ConvShape &  c,
int  xz,
std::span< const int32_t >  wz 
)

Gpu conv resident.

在文件 OnnxGpuKernels.cpp 第 75 行定义.

引用了 c, d, enqueueInteger(), s, size, eve::Unsupported, w, wz , 以及 x.

被这些函数引用 executeQuant() , 以及 gpuConv().

◆ gpuMatmul()

std::vector< int32_t > eve::tensor::onnx_detail::gpuMatmul ( OnnxCompute &  d,
affine::ByteView  a,
affine::ByteView  b,
size_t  m,
size_t  k,
size_t  n,
int  az,
std::span< const int32_t >  bz 
)

Gpu matmul.

在文件 OnnxGpuKernels.cpp 第 40 行定义.

引用了 a, az, b, bz, d, gpuMatmulResident(), m , 以及 n.

被这些函数引用 eve::tensor::affine::matmul().

◆ gpuMatmulResident()

OnnxBuffer eve::tensor::onnx_detail::gpuMatmulResident ( OnnxCompute &  d,
OnnxBuffer  a,
OnnxBuffer  b,
bool  as,
bool  bs,
size_t  m,
size_t  k,
size_t  n,
int  az,
std::span< const int32_t >  bz,
size_t  bOffset 
)

Gpu matmul resident.

在文件 OnnxGpuKernels.cpp 第 64 行定义.

引用了 a, az, b, bz, d, enqueueInteger(), m, n , 以及 s.

被这些函数引用 executeQuant() , 以及 gpuMatmul().

◆ integer()

int64_t eve::tensor::onnx_detail::integer ( const RuntimeTensor &  v,
size_t  i = 0 
)
inline

◆ ints()

std::vector< int64_t > eve::tensor::onnx_detail::ints ( const RuntimeTensor &  v)
inline

Ints.

Out.

在文件 OnnxInternal.h 第 120 行定义.

引用了 count, integer() , 以及 v.

被这些函数引用 execute(), executeMisc(), executeNeural(), executeNumeric(), executeQuant(), executeQuantLstm() , 以及 executeShape().

◆ isSupported()

bool eve::tensor::onnx_detail::isSupported ( const Node &  n)

True when supported.

在文件 OnnxExecute.cpp 第 11 行定义.

引用了 a, key, maximum, minimum , 以及 n.

被这些函数引用 parse().

◆ make()

template<class T >
RuntimeTensor eve::tensor::onnx_detail::make ( OnnxElement  e,
std::vector< int64_t >  shape,
const std::vector< T > &  values 
)

Make.

Validate.

在文件 OnnxInternal.h 第 91 行定义.

引用了 shape, v, validate() , 以及 values.

被这些函数引用 execute(), executeIndex(), executeMisc(), executeNeural(), executeNumeric(), executeQuant(), executeQuantLstm() , 以及 executeShape().

◆ parse()

ModelData eve::tensor::onnx_detail::parse ( std::span< const uint8_t >  bytes)

Parse.

在文件 OnnxReader.cpp 第 316 行定义.

引用了 a, bytes, f, g, graph, input, isSupported(), key, model, n, name, ops, eve::ParseError, r, root, t, eve::UnknownVersion, eve::Unsupported, v, wire , 以及 x.

被这些函数引用 eve::tensor::OnnxModel::load().

◆ read()

template<class T >
T eve::tensor::onnx_detail::read ( const RuntimeTensor &  v,
size_t  i 
)

Reads read.

Memcpy.

在文件 OnnxInternal.h 第 83 行定义.

引用了 v , 以及 x.

◆ required()

const RuntimeTensor & eve::tensor::onnx_detail::required ( const std::vector< const RuntimeTensor * > &  in,
size_t  i 
)
inline

Required.

在文件 OnnxInternal.h 第 137 行定义.

◆ validate()

void eve::tensor::onnx_detail::validate ( const RuntimeTensor &  v)
inline

Validate.

在文件 OnnxInternal.h 第 78 行定义.

引用了 count, elementSize() , 以及 v.

被这些函数引用 make().