Specification of a named tensor: shape, element type, name, and port.
Synopsis
Declared in <llvm/Analysis/TensorSpec.h>
class TensorSpec final
Description
TensorSpec encapsulates the specification of a tensor: its dimensions, or "shape" (row‐major), its type (see TensorSpec::getDataType specializations for supported types), its name and port (see "TensorFlow: Large‐Scale Machine Learning on Heterogeneous Distributed Systems", section 4.2, para 2: https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45166.pdf)
Note that the design is motivated by Tensorflow, but it is not intended to be Tensorflow‐specific.
Member Functions
Name |
Description |
|
Construct a TensorSpec that copies |
Get the size, in bytes, of one element. |
|
Get the number of elements in a tensor with this shape. |
|
Get the total size of a memory buffer needed to store the whole tensor. |
|
Return true if the element type is |
|
Return the tensor name. |
|
Return the tensor port index. |
|
Return the tensor dimensions in row‐major order. |
|
Write this specification as a JSON object to |
|
Return the element type of the tensor. |
|
Return true if this specification equals |
|
Return true if this specification differs from |
Static Member Functions
Name |
Description |
Create a TensorSpec for element type |
Non-Member Functions
Name |
Description |
Construct a TensorSpec from a JSON dictionary describing the tensor. |
Created with MrDocs