MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / Tensor

Method Tensor

src/fastertransformer/utils/Tensor.cc:36–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34namespace fastertransformer {
35
36Tensor::Tensor():
37 // a none tensor.
38 where(MEMORY_CPU),
39 type(TYPE_INVALID),
40 shape({}),
41 data(nullptr),
42 offsets({}) // only a record to record offset
43{
44}
45
46Tensor::Tensor(const MemoryType _where, const DataType _type, const std::vector<size_t> _shape, const void* _data):
47 where(_where), type(_type), shape(_shape), data(_data)

Callers 10

__init__Method · 0.45
to_int8Method · 0.45
__init__Method · 0.45
_run_encoderMethod · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected