载入中...
搜索中...
未找到
TF.cpp 文件参考
#include "tensor/TF.h"
#include "tensor/CpuKernels.h"
#include "tensor/GpuBackend.h"
#include "tensor/Graph.h"
#include "tensor/Quant.h"
#include "tensor/Tensor.h"
#include "common/Exception.h"
#include <simplesquirrel/simplesquirrel.hpp>
#include <cmath>
#include <cstdint>
#include <cstring>

浏览源代码.

命名空间

namespace  eve
 
namespace  eve::tensor
 

宏定义

#define EVE_TF_UNARY(name, method, opType)
 
#define EVE_TF_BINARY(name, method, opType)
 
#define EVE_TF_AXIS_REDUCE(name, opType)
 

函数

 eve::tensor::Module_IMPL (TF, new TF())
 

宏定义说明

◆ EVE_TF_AXIS_REDUCE

#define EVE_TF_AXIS_REDUCE (   name,
  opType 
)
值:
Tensor *TF::name(Tensor *a, int axis, int keepDims) { \
if (!a) throw Exception("TF." #name ": null"); \
if (Func *f = tracing()) return f->emitReduce(opType, a, axis, keepDims != 0); \
a->ensureEager(#name); \
axis = normalizeAxis(axis, a->getRank()); \
int srcDims[Tensor::kMaxRank] = {}; \
for (int k = 0; k < a->getRank(); ++k) srcDims[k] = a->getDim(k); \
int od[Tensor::kMaxRank] = {}; \
int outRank = 0; \
reduceOutDims(srcDims, a->getRank(), axis, keepDims != 0, od, outRank); \
auto *out = new Tensor(od, outRank); \
kernels::reduceAxis(opType, a->data(), srcDims, a->getRank(), axis, out->data(), od, \
outRank); \
return out; \
}
uint32_t a
float f
const char * name
Definition RockMesh.cpp:21

在文件 TF.cpp709 行定义.

◆ EVE_TF_BINARY

#define EVE_TF_BINARY (   name,
  method,
  opType 
)
值:
Tensor *TF::name(Tensor *a, Tensor *b) { \
if (!a || !b) throw Exception("TF." #name ": null"); \
if (Func *f = tracing()) return f->emitBinary(opType, a, b); \
a->ensureEager(#name); \
b->ensureEager(#name); \
return a->method(b); \
}
uint32_t b

在文件 TF.cpp291 行定义.

◆ EVE_TF_UNARY

#define EVE_TF_UNARY (   name,
  method,
  opType 
)
值:
Tensor *TF::name(Tensor *a) { \
if (!a) throw Exception("TF." #name ": null"); \
if (Func *f = tracing()) return f->emitUnary(opType, a); \
a->ensureEager(#name); \
return a->method(); \
}

在文件 TF.cpp268 行定义.