llvm::TensorSpec

Synopsis

Declared in <llvm/Analysis/TensorSpec.h>

class TensorSpec final

Member Functions

NameDescription
TensorSpec [constructor]
getElementByteSize Get the size, in bytes, of one element.
getElementCount Get the number of elements in a tensor with this shape.
getTotalTensorBufferSize Get the total size of a memory buffer needed to store the whole tensor.
isElementType
name
port
shape
toJSON
type
operator== Equality operator
operator!= Inequality operator

Static Member Functions

Name
createSpec

Non-Member Functions

NameDescription
getTensorSpecFromJSONConstruct a TensorSpec from a JSON dictionary of the form: { "name": <string>, "port": <int>, "type": <string. Use LLVM's types, e.g. float, double, int64_t>, "shape": <array of ints> } For the "type" field, see the C++ primitive types used in TFUTILS_SUPPORTED_TYPES.