35#include "src/jazz_bebop/data_spaces.h"
36#include "src/onnx_proto/onnx.pb.h"
37#include "onnxruntime_c_api.h"
40#ifndef INCLUDED_JAZZ_CATCH2
41#define INCLUDED_JAZZ_CATCH2
43#include "src/catch2/catch.hpp"
49#ifndef INCLUDED_JAZZ_BEBOP_OPCODES
50#define INCLUDED_JAZZ_BEBOP_OPCODES
237 return &
opcodes.at(it->second);
248 std::string &all_types);
250 std::string &type_name);
An attribute for an ONNX OpCode.
Definition opcodes.h:105
OnnxAttribute(stdName nam, AttributeType typ)
The constructor for an OnnxAttribute.
Definition opcodes.h:113
stdName name
The name of the attribute.
Definition opcodes.h:118
AttributeType type
The types of the attribute.
Definition opcodes.h:119
An ONNX OpCode.
Definition opcodes.h:126
OnnxParameters inputs
The input parameters.
Definition opcodes.h:147
OnnxOpCode(stdName nam, int version, OnnxParameters in, OnnxParameters out, OnnxAttributes attr)
The constructor for an OnnxOpCode.
Definition opcodes.h:137
stdName name
The name of the ONNX OpCode.
Definition opcodes.h:145
int opset_version
The version of the opset.
Definition opcodes.h:146
OnnxAttributes attributes
The attributes.
Definition opcodes.h:149
OnnxParameters outputs
The output parameters.
Definition opcodes.h:148
A parameter (input or output) for an ONNX OpCode.
Definition opcodes.h:84
OnnxParameter(stdName nam, TensorTypes typ)
The constructor for an OnnxParameter.
Definition opcodes.h:92
TensorTypes types
The types of the parameter.
Definition opcodes.h:98
stdName name
The name of the parameter.
Definition opcodes.h:97
OpCodes: The opcodes.
Definition opcodes.h:198
bool fill_all_dict_versions()
Fill all versions of the dictionary.
Definition opcodes.cpp:295
int ir_vers
Argument of model.set_ir_version() (Stored as ONNX_IR_VERSION in config.)
Definition opcodes.h:253
int latest_opset_version()
Get the latest opset version.
Definition opcodes.h:210
ConfigFile onnx_conf
The ONNX opcodes reference stored as a ConfigFile.
Definition opcodes.h:252
OnnxOpCodeDict opcodes_idx
The index to the opcodes.
Definition opcodes.h:256
bool fill_op_code(OnnxOpCode &op)
Fill an ONNX OpCode. This completes all the fields of an OpCode other than name and version....
Definition opcodes.cpp:208
int op_vers_latest
The latest opset version in onnx.ini.
Definition opcodes.h:254
bool fill_tensor_types(TensorTypes &types, std::string &all_types)
Fill the tensor types. This fills a list of tensor types from a string with the names of the types se...
Definition opcodes.cpp:330
OnnxOpCodes opcodes
The opcodes parsed as binary objects.
Definition opcodes.h:257
bool set_opset_version(int version)
Set the opset version.
Definition opcodes.h:218
int op_vers_current
The opset version in use, set by set_opset_version() or op_vers_latest.
Definition opcodes.h:255
virtual StatusCode start()
A simple start()/shut_down() interface (Restart is: shut_down(TRUE):start())
Definition opcodes.cpp:96
virtual StatusCode shut_down()
Definition opcodes.cpp:127
bool fill_attribute_type(AttributeType &type, std::string &type_name)
Fill the attribute type. This fills an attribute type from a string with the name of the type.
Definition opcodes.cpp:354
bool build_opcode_dict()
Build the opcode dictionary. This build the vector opcodes and the dictionary opcodes_idx from the co...
Definition opcodes.cpp:137
pOnnxOpCode get(stdName name)
Get an ONNX OpCode.
Definition opcodes.h:231
A pair of a name and a version to be used as a key in a dictionary.
Definition opcodes.h:157
bool operator==(const stdNameVersion &o) const
Operator this == o.
Definition opcodes.h:176
int opset_version
The version of the opset.
Definition opcodes.h:191
stdName name
The name of the ONNX OpCode.
Definition opcodes.h:190
bool operator<(const stdNameVersion &o) const
Operator this < o.
Definition opcodes.h:186
stdNameVersion(stdName nam, int version)
The constructor for a stdNameVersion.
Definition opcodes.h:165
A wrapped Name that supports being stacked in an std::vector and used as a key in an std::map.
Definition space.h:67
Name name
The name.
Definition space.h:109
A configuration file as a key/value store.
Definition utils.h:217
A simple logger.
Definition utils.h:245
A Jazz Service is a globally instanced configurable object that may allocate RAM.
Definition utils.h:285
A language to access any container by base using locators.
Definition base_api.cpp:39
std::vector< TensorType > TensorTypes
A list of TensorType objects.
Definition opcodes.h:67
std::vector< OnnxParameter > OnnxParameters
A list of OnnxParameter objects.
Definition opcodes.h:100
TensorTypes * pTensorTypes
A pointer to a TensorTypes.
Definition opcodes.h:68
std::vector< OnnxOpCode > OnnxOpCodes
A list of OnnxOpCode objects.
Definition opcodes.h:152
OpCodes * pOpCodes
A pointer to an OpCodes object.
Definition opcodes.h:259
OnnxOpCode * pOnnxOpCode
A pointer to an OnnxOpCode object.
Definition opcodes.h:151
std::map< stdName, TensorType > TensorTypeDict
A map of TensorType objects.
Definition opcodes.h:66
std::map< stdName, AttributeType > AttributeTypeDict
A map of AttributeType objects.
Definition opcodes.h:78
AttributeType * pAttributeType
A pointer to a AttributeType.
Definition opcodes.h:79
std::map< stdNameVersion, int > OnnxOpCodeDict
A map of OnnxOpCode objects.
Definition opcodes.h:193
std::vector< OnnxAttribute > OnnxAttributes
A list of OnnxAttribute objects.
Definition opcodes.h:121
int StatusCode
Type returned by the Service API.
Definition utils.h:141
A type definition for attributes across Jazz native (with special codes), and ONNX protocol buffer.
Definition opcodes.h:73
int jazz_type
The Jazz native type.
Definition opcodes.h:74
onnx::AttributeProto::AttributeType onnx_proto_type
The ONNX protocol buffer type.
Definition opcodes.h:75
bool is_multi
True if the attribute is a list of the type.
Definition opcodes.h:76
A type definition for tensors across all the technologies: Jazz native, ONNX protocol buffer and ONNX...
Definition opcodes.h:61
onnx::TensorProto::DataType onnx_proto_type
The ONNX protocol buffer type.
Definition opcodes.h:63
int jazz_type
The Jazz native type.
Definition opcodes.h:62
ONNXTensorElementDataType onnx_rt_type
The ONNX runtime type.
Definition opcodes.h:64