35#include "src/jazz_core/std_wrap.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
236 return &
opcodes.at(it->second);
An attribute for an ONNX OpCode.
Definition opcodes.h:104
OnnxAttribute(stdName nam, AttributeType typ)
The constructor for an OnnxAttribute.
Definition opcodes.h:112
AttributeType type
The types of the attribute.
Definition opcodes.h:118
stdName name
The name of the attribute.
Definition opcodes.h:117
An ONNX OpCode.
Definition opcodes.h:125
OnnxParameters inputs
The input parameters.
Definition opcodes.h:146
stdName name
The name of the ONNX OpCode.
Definition opcodes.h:144
OnnxAttributes attributes
The attributes.
Definition opcodes.h:148
OnnxOpCode(stdName nam, int version, OnnxParameters in, OnnxParameters out, OnnxAttributes attr)
The constructor for an OnnxOpCode.
Definition opcodes.h:136
int opset_version
The version of the opset.
Definition opcodes.h:145
OnnxParameters outputs
The output parameters.
Definition opcodes.h:147
A parameter (input or output) for an ONNX OpCode.
Definition opcodes.h:83
OnnxParameter(stdName nam, TensorTypes typ)
The constructor for an OnnxParameter.
Definition opcodes.h:91
stdName name
The name of the parameter.
Definition opcodes.h:96
TensorTypes types
The types of the parameter.
Definition opcodes.h:97
OpCodes: The opcodes.
Definition opcodes.h:197
bool fill_all_dict_versions()
Fill all versions of the dictionary.
Definition opcodes.cpp:295
OnnxOpCodes opcodes
The opcodes parsed as binary objects.
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
ConfigFile onnx_conf
The ONNX opcodes reference stored as a ConfigFile.
Definition opcodes.h:251
virtual StatusCode shut_down()
Definition opcodes.cpp:127
int latest_opset_version()
Get the latest opset version.
Definition opcodes.h:209
pOnnxOpCode get(stdName name)
Get an ONNX OpCode.
Definition opcodes.h:230
int log_error_level
The log level to silence it in tests.
Definition opcodes.h:257
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
bool set_opset_version(int version)
Set the opset version.
Definition opcodes.h:217
OnnxOpCodeDict opcodes_idx
The index to the opcodes.
Definition opcodes.h:255
int op_vers_current
The opset version in use, set by set_opset_version() or op_vers_latest.
Definition opcodes.h:254
int op_vers_latest
The latest opset version in onnx.ini.
Definition opcodes.h:253
int ir_vers
Argument of model.set_ir_version() (Stored as ONNX_IR_VERSION in config.)
Definition opcodes.h:252
bool fill_attribute_type(AttributeType &type, 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
virtual StatusCode start()
A simple start()/shut_down() interface (Restart is: shut_down(TRUE):start())
Definition opcodes.cpp:96
bool fill_tensor_types(TensorTypes &types, 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
A pair of a name and a version to be used as a key in a dictionary.
Definition opcodes.h:156
int opset_version
The version of the opset.
Definition opcodes.h:190
bool operator==(const stdNameVersion &o) const
Operator this == o.
Definition opcodes.h:175
stdNameVersion(stdName nam, int version)
The constructor for a stdNameVersion.
Definition opcodes.h:164
stdName name
The name of the ONNX OpCode.
Definition opcodes.h:189
bool operator<(const stdNameVersion &o) const
Operator this < o.
Definition opcodes.h:185
A wrapped Name that supports being stacked in an std::vector and used as a key in an std::map.
Definition std_wrap.h:62
Name name
The name.
Definition std_wrap.h:104
A configuration file as a key/value store.
Definition utils.h:218
A simple logger.
Definition utils.h:248
A Jazz Service is a globally instanced configurable object that may allocate RAM.
Definition utils.h:288
A language to access any container by base using locators.
Definition base_api.cpp:39
std::map< stdName, AttributeType > AttributeTypeDict
A map of AttributeType objects.
Definition opcodes.h:77
OpCodes * pOpCodes
A pointer to an OpCodes object.
Definition opcodes.h:259
TensorTypes * pTensorTypes
A pointer to a TensorTypes.
Definition opcodes.h:67
std::vector< TensorType > TensorTypes
A list of TensorType objects.
Definition opcodes.h:66
std::vector< OnnxAttribute > OnnxAttributes
A list of OnnxAttribute objects.
Definition opcodes.h:120
std::vector< OnnxParameter > OnnxParameters
A list of OnnxParameter objects.
Definition opcodes.h:99
std::map< stdName, TensorType > TensorTypeDict
A map of TensorType objects.
Definition opcodes.h:65
std::vector< OnnxOpCode > OnnxOpCodes
A list of OnnxOpCode objects.
Definition opcodes.h:151
AttributeType * pAttributeType
A pointer to a AttributeType.
Definition opcodes.h:78
std::map< stdNameVersion, int > OnnxOpCodeDict
A map of OnnxOpCode objects.
Definition opcodes.h:192
OnnxOpCode * pOnnxOpCode
A pointer to an OnnxOpCode object.
Definition opcodes.h:150
std::string String
A standard string used in many other places in Jazz.
Definition types.h:239
int StatusCode
Type returned by the Service API.
Definition utils.h:142
A type definition for attributes across Jazz native (with special codes), and ONNX protocol buffer.
Definition opcodes.h:72
bool is_multi
True if the attribute is a list of the type.
Definition opcodes.h:75
int jazz_type
The Jazz native type.
Definition opcodes.h:73
onnx::AttributeProto::AttributeType onnx_proto_type
The ONNX protocol buffer type.
Definition opcodes.h:74
A type definition for tensors across all the technologies: Jazz native, ONNX protocol buffer and ONNX...
Definition opcodes.h:60
ONNXTensorElementDataType onnx_rt_type
The ONNX runtime type.
Definition opcodes.h:63
onnx::TensorProto::DataType onnx_proto_type
The ONNX protocol buffer type.
Definition opcodes.h:62
int jazz_type
The Jazz native type.
Definition opcodes.h:61