LLVM 22.0.0git
|
#include "llvm/Analysis/TensorSpec.h"
Public Member Functions | |
const std::string & | name () const |
int | port () const |
TensorType | type () const |
const std::vector< int64_t > & | shape () const |
bool | operator== (const TensorSpec &Other) const |
bool | operator!= (const TensorSpec &Other) const |
size_t | getElementCount () const |
Get the number of elements in a tensor with this shape. | |
size_t | getElementByteSize () const |
Get the size, in bytes, of one element. | |
size_t | getTotalTensorBufferSize () const |
Get the total size of a memory buffer needed to store the whole tensor. | |
template<typename T> | |
bool | isElementType () const |
TensorSpec (const std::string &NewName, const TensorSpec &Other) | |
LLVM_ABI void | toJSON (json::OStream &OS) const |
Static Public Member Functions | |
template<typename T> | |
static TensorSpec | createSpec (const std::string &Name, const std::vector< int64_t > &Shape, int Port=0) |
Definition at line 63 of file TensorSpec.h.
|
inline |
Definition at line 95 of file TensorSpec.h.
References llvm::Other, and TensorSpec().
Referenced by createSpec(), operator!=(), operator==(), and TensorSpec().
|
inlinestatic |
Definition at line 66 of file TensorSpec.h.
References T, and TensorSpec().
Referenced by INITIALIZE_PASS(), and llvm::MLInlineAdvisor::MLInlineAdvisor().
|
inline |
Get the size, in bytes, of one element.
Definition at line 87 of file TensorSpec.h.
|
inline |
Get the number of elements in a tensor with this shape.
Definition at line 85 of file TensorSpec.h.
|
inline |
Get the total size of a memory buffer needed to store the whole tensor.
Definition at line 89 of file TensorSpec.h.
Definition at line 91 of file TensorSpec.h.
|
inline |
Definition at line 72 of file TensorSpec.h.
Referenced by toJSON().
|
inline |
Definition at line 82 of file TensorSpec.h.
References llvm::Other, and TensorSpec().
|
inline |
Definition at line 77 of file TensorSpec.h.
References llvm::Other, and TensorSpec().
|
inline |
Definition at line 73 of file TensorSpec.h.
Referenced by toJSON().
|
inline |
Definition at line 75 of file TensorSpec.h.
Referenced by toJSON().
void llvm::TensorSpec::toJSON | ( | json::OStream & | OS | ) | const |
Definition at line 50 of file TensorSpec.cpp.
References llvm::json::OStream::attribute(), llvm::json::OStream::attributeArray(), D(), name(), llvm::json::OStream::object(), port(), shape(), llvm::toString(), type(), and llvm::json::OStream::value().
|
inline |
Definition at line 74 of file TensorSpec.h.
Referenced by toJSON().