LLVM  16.0.0git
Classes | Namespaces | Macros | Enumerations | Functions
TensorSpec.h File Reference
#include "llvm/Config/llvm-config.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/Support/JSON.h"
#include <memory>
#include <vector>
Include dependency graph for TensorSpec.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  llvm::TensorSpec
 
struct  llvm::LoggedFeatureSpec
 

Namespaces

 llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Macros

#define SUPPORTED_TENSOR_TYPES(M)
 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) More...
 
#define _TENSOR_TYPE_ENUM_MEMBERS(_, Name)   Name,
 
#define TFUTILS_GETDATATYPE_DEF(T, Name)   template <> TensorType TensorSpec::getDataType<T>();
 

Enumerations

enum  llvm::TensorType { llvm::TensorType::Invalid, llvm::TensorType::_TENSOR_TYPE_ENUM_MEMBERS }
 

Functions

Optional< TensorSpecllvm::getTensorSpecFromJSON (LLVMContext &Ctx, const json::Value &Value)
 Construct a TensorSpec from a JSON dictionary of the form: { "name": <string>, "port": <int>, "type": <string. More...
 
Optional< std::vector< LoggedFeatureSpec > > llvm::loadOutputSpecs (LLVMContext &Ctx, StringRef ExpectedDecisionName, StringRef ModelPath, StringRef SpecFileOverride=StringRef())
 Load the output specs. More...
 

Macro Definition Documentation

◆ _TENSOR_TYPE_ENUM_MEMBERS

#define _TENSOR_TYPE_ENUM_MEMBERS (   _,
  Name 
)    Name,

Definition at line 47 of file TensorSpec.h.

◆ SUPPORTED_TENSOR_TYPES

#define SUPPORTED_TENSOR_TYPES (   M)
Value:
M(float, Float) \
M(double, Double) \
M(int8_t, Int8) \
M(uint8_t, UInt8) \
M(int16_t, Int16) \
M(int32_t, Int32) \
M(int64_t, Int64) \

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)

Known tensor types. The left part is the C type, the right is a name we can use to identify the type (to implement TensorSpec equality checks), and to use, if needed, when mapping to an underlying evaluator's type system. The main requirement is that the C type we use has the same size and encoding (e.g. endian-ness) as the one used by the evaluator.

Definition at line 33 of file TensorSpec.h.

◆ TFUTILS_GETDATATYPE_DEF

#define TFUTILS_GETDATATYPE_DEF (   T,
  Name 
)    template <> TensorType TensorSpec::getDataType<T>();

Definition at line 125 of file TensorSpec.h.

M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
Int64
@ Int64
Definition: TargetLibraryInfo.cpp:52
llvm::pdb::UInt16
@ UInt16
Definition: PDBTypes.h:404
Int16
@ Int16
Definition: TargetLibraryInfo.cpp:46
llvm::pdb::Double
@ Double
Definition: PDBTypes.h:402
llvm::pdb::UInt32
@ UInt32
Definition: PDBTypes.h:405
llvm::pdb::Int8
@ Int8
Definition: PDBTypes.h:397
uint64_t
llvm::NVPTX::PTXLdStInstCode::Float
@ Float
Definition: NVPTX.h:118
uint32_t
uint16_t
llvm::pdb::UInt64
@ UInt64
Definition: PDBTypes.h:406
llvm::pdb::UInt8
@ UInt8
Definition: PDBTypes.h:403
Int32
@ Int32
Definition: TargetLibraryInfo.cpp:47