Jazz 1.25.+
Loading...
Searching...
No Matches
Data Structures | Typedefs | Variables
jazz_bebop Namespace Reference

A language to access any container by base using locators. More...

Data Structures

struct  ApiQueryState
 A buffer to keep the state while parsing/executing a query. More...
 
struct  AttributeType
 A type definition for attributes across Jazz native (with special codes), and ONNX protocol buffer. More...
 
class  BaseAPI
 BaseAPI: The parent of API and Core. More...
 
class  Bop
 Bop: The Bebop compiler and decompiler. More...
 
class  Caster
 Caster: An optional converter of the output. More...
 
class  ColSelection
 ColSelection: A selection of columns from a Space. More...
 
class  Core
 Core: The execution unit is now a wrapper around onnx-runtime. More...
 
class  DataSpaces
 DataSpaces: The data space. More...
 
class  Fields
 Fields: A Space for Snippets. More...
 
class  OnnxAttribute
 An attribute for an ONNX OpCode. More...
 
class  OnnxOpCode
 An ONNX OpCode. More...
 
class  OnnxParameter
 A parameter (input or output) for an ONNX OpCode. More...
 
class  OpCodes
 OpCodes: The opcodes. More...
 
class  RowSelection
 RowSelection: An iterator over the rows of a Space. More...
 
class  Snippet
 Snippet: A code snippet and the ancestor of Concept. More...
 
class  Space
 Space: The abstract space. More...
 
class  stdName
 A wrapped Name that supports being stacked in an std::vector and used as a key in an std::map. More...
 
class  stdNameVersion
 A pair of a name and a version to be used as a key in a dictionary. More...
 
struct  TensorType
 A type definition for tensors across all the technologies: Jazz native, ONNX protocol buffer and ONNX runtime. More...
 

Typedefs

typedef ParseStateTransition ParseStateTransitions[NUM_STATE_TRANSITIONS]
 
typedef BaseAPIpBaseAPI
 A pointer to a BaseAPI.
 
typedef BoppBop
 A pointer to a Bop.
 
typedef CorepCore
 A pointer to a Core.
 
typedef DataSpacespDataSpace
 A pointer to a DataSpaces.
 
typedef FieldspFields
 A pointer to a Fields.
 
typedef std::map< stdName, TensorTypeTensorTypeDict
 A map of TensorType objects.
 
typedef std::vector< TensorTypeTensorTypes
 A list of TensorType objects.
 
typedef TensorTypespTensorTypes
 A pointer to a TensorTypes.
 
typedef std::map< stdName, AttributeTypeAttributeTypeDict
 A map of AttributeType objects.
 
typedef AttributeTypepAttributeType
 A pointer to a AttributeType.
 
typedef std::vector< OnnxParameterOnnxParameters
 A list of OnnxParameter objects.
 
typedef std::vector< OnnxAttributeOnnxAttributes
 A list of OnnxAttribute objects.
 
typedef OnnxOpCodepOnnxOpCode
 A pointer to an OnnxOpCode object.
 
typedef std::vector< OnnxOpCodeOnnxOpCodes
 A list of OnnxOpCode objects.
 
typedef std::map< stdNameVersion, int > OnnxOpCodeDict
 A map of OnnxOpCode objects.
 
typedef OpCodespOpCodes
 A pointer to an OpCodes object.
 
typedef std::vector< std::string > SnippetText
 A SnippetText is a vector of strings.
 
typedef SnippetTextpSnippetText
 A pointer to a SnippetText.
 
typedef SnippetpSnippet
 A pointer to a Snippet.
 
typedef uint64_t RowNumber
 A row number in a Space.
 
typedef Name ColumnName
 A column name in a Space.
 
typedef SpacepSpace
 Forward definition of Space.
 
typedef std::vector< stdNamestdNames
 A vector of stdName.
 
typedef RowSelectionpRowSelection
 A pointer to a RowSelection.
 
typedef ColSelectionpColSelection
 A pointer to a ColSelection.
 
typedef CasterpCaster
 A pointer to a Caster.
 
typedef std::map< stdName, pCasterCasters
 A map of Caster pointers.
 
typedef CasterspCasters
 A pointer to a Casters.
 

Variables

ParseStateTransitions state_tr
 
ParseNextStateLUT parser_state_switch [MAX_NUM_PSTATES]
 
TensorTypeDict TENSOR_TYPES
 A table to locate all the possible ONNX tensor types by their name in the config file "onnx.ini".
 
AttributeTypeDict ATTRIBUTE_TYPES
 A table to locate all the possible ONNX attribute types by their name in the config file "onnx.ini".
 
const char KIND_SNIPPET []
 
const char EMPTY_SNIPPET []
 
const char SNIPPET_VERSION [] = "snp1"
 The content of the attribute BLOCK_ATTRIB_SNIPVERS.
 
const char SNIPSTATE_EMPTY_SNIPPET [] = "____"
 The snippet is empty.
 
const char SNIPSTATE_SOURCE_AVAILABLE [] = "s___"
 The source code is available.
 
const char SNIPSTATE_SOURCE_PREPROCESSED [] = "sx__"
 The source code has been preprocessed successfully.
 
const char SNIPSTATE_SOURCE_COMPILED [] = "sxo_"
 The source code has been compiled successfully.
 
const char SNIPSTATE_OBJECT_AVAILABLE [] = "__o_"
 The snippet is created from an onnx object.
 
const char SNIPSTATE_OBJECT_PREPROCESSED [] = "_xo_"
 The snippet (from onnx) has been reverse engineered successfully.
 
const char SNIPSTATE_CAN_RUN [] = "___a"
 The global state is neither error nor empty state() >= SNIPSTATE_CAN_RUN.
 
const char SNIPSTATE_CAN_RUN_OBJECT [] = "_xor"
 The snippet (from onnx) is ready to run (or has run before)
 
const char SNIPSTATE_CAN_RUN_SOURCE [] = "sxor"
 The snippet (from source) is ready to run (or has run before)
 
const char SNIPSTATE_IS_RUNNING_OBJECT [] = "_xoi"
 The snippet is currently running (from onnx)
 
const char SNIPSTATE_IS_RUNNING_SOURCE [] = "sxoi"
 The snippet is currently running (from source)
 
const char SNIPSTATE_FAILED_SRC_PREPROC [] = "sX_!"
 The source code preprocessing failed.
 
const char SNIPSTATE_FAILED_SRC_COMPILE [] = "sxO!"
 The source code compilation failed.
 
const char SNIPSTATE_FAILED_OBJ_PREPROC [] = "_Xo!"
 The snippet (from onnx) reverse engineering failed.
 
const char SNIPSTATE_FAILED_RUN_OBJECT [] = "_xo!"
 The snippet failed to run (from onnx)
 
const char SNIPSTATE_FAILED_RUN_SOURCE [] = "sxo!"
 The snippet failed to run (from source)
 

Detailed Description

A language to access any container by base using locators.

A Concept ancestor that contains both the source and the object code.

In Bop-25, opcodes are onnx-runtime operations.

The DataSpaces and its utilities.

Core: The execution unit is now a wrapper around onnx-runtime.

The Bop compiler.

BaseAPI is a Container and a parent of: Core, ModelsAPI and API.

See also
Container, Core, ModelsAPI and API

A core is not a service, it is stored in a Bop API.

This is an essential part of Bop to abstract data storage supporting dataframes, possibly sharded and lazy-loaded. It also provides indexing which can select rows, keys of find nearest neighbors.

A Snippet is an object that can do both forward (compile) and reverse engineering (decompile) between compilable Bop and an onnx file. It supports a number of serializations to and from Jazz Blocks. It forms the minimal unit of what can be run.

Typedef Documentation

◆ ParseStateTransitions

typedef ParseStateTransition jazz_bebop::ParseStateTransitions[NUM_STATE_TRANSITIONS]

A vector of StateTransition. This only runs once, on construction of the API object, initializes the LUTs from a sequence of StateTransition constants in the source of api.cpp.

◆ SnippetText

typedef std::vector<std::string> jazz_bebop::SnippetText

A SnippetText is a vector of strings.

A std::vector of std::string to hold the source and intermediate code of a Snippet. This is used to make compilation and code generation easier to interface in c++.

The caller owns the object (initially empty) and is responsible for freeing it when no longer needed.

◆ pSpace

Forward definition of Space.

A pointer to a Space

Variable Documentation

◆ state_tr

ParseStateTransitions jazz_bebop::state_tr

The parser logic defined in terms of transitions between states.

◆ parser_state_switch

ParseNextStateLUT jazz_bebop::parser_state_switch[MAX_NUM_PSTATES]

The parser logic defined as a LUT (initialized by compile_next_state_LUT()).

◆ TENSOR_TYPES

TensorTypeDict jazz_bebop::TENSOR_TYPES
Initial value:
= {
{(pChar) "bool", {CELL_TYPE_BYTE_BOOLEAN, onnx::TensorProto::BOOL, ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL}},
{(pChar) "double", {CELL_TYPE_DOUBLE, onnx::TensorProto::DOUBLE, ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE}},
{(pChar) "float", {CELL_TYPE_SINGLE, onnx::TensorProto::FLOAT, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT}},
{(pChar) "string", {CELL_TYPE_STRING, onnx::TensorProto::STRING, ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING}},
{(pChar) "bfloat16",{CELL_TYPE_BFLOAT16, onnx::TensorProto::BFLOAT16, ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16}},
{(pChar) "float16", {CELL_TYPE_FLOAT16, onnx::TensorProto::FLOAT16, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16}},
{(pChar) "int16", {CELL_TYPE_INT16, onnx::TensorProto::INT16, ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16}},
{(pChar) "int32", {CELL_TYPE_INTEGER, onnx::TensorProto::INT32, ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32}},
{(pChar) "int64", {CELL_TYPE_LONG_INTEGER, onnx::TensorProto::INT64, ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64}},
{(pChar) "int8", {CELL_TYPE_INT8, onnx::TensorProto::INT8, ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8}},
{(pChar) "uint16", {CELL_TYPE_UINT16, onnx::TensorProto::UINT16, ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16}},
{(pChar) "uint32", {CELL_TYPE_UINT32, onnx::TensorProto::UINT32, ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32}},
{(pChar) "uint64", {CELL_TYPE_UINT64, onnx::TensorProto::UINT64, ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64}},
{(pChar) "uint8", {CELL_TYPE_BYTE, onnx::TensorProto::UINT8, ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8}}
}
char * pChar
A pointer to a char buffer.
Definition types.h:185

A table to locate all the possible ONNX tensor types by their name in the config file "onnx.ini".

The table is a map of strings to a TensorType: Jazz native type, ONNX protocol buffer type and ONNX runtime type.

◆ ATTRIBUTE_TYPES

AttributeTypeDict jazz_bebop::ATTRIBUTE_TYPES
Initial value:
= {
{(pChar) "float", {CELL_TYPE_SINGLE, onnx::AttributeProto::AttributeType::AttributeProto_AttributeType_FLOAT, false}},
{(pChar) "floats", {CELL_TYPE_SINGLE, onnx::AttributeProto::AttributeType::AttributeProto_AttributeType_FLOATS, true}},
{(pChar) "int", {CELL_TYPE_LONG_INTEGER, onnx::AttributeProto::AttributeType::AttributeProto_AttributeType_INT, false}},
{(pChar) "ints", {CELL_TYPE_LONG_INTEGER, onnx::AttributeProto::AttributeType::AttributeProto_AttributeType_INTS, true}},
{(pChar) "string", {CELL_TYPE_STRING, onnx::AttributeProto::AttributeType::AttributeProto_AttributeType_STRING, false}},
{(pChar) "strings", {CELL_TYPE_STRING, onnx::AttributeProto::AttributeType::AttributeProto_AttributeType_STRING, true}},
{(pChar) "graph", {CELL_TYPE_ONNX_GRAPH, onnx::AttributeProto::AttributeType::AttributeProto_AttributeType_GRAPH, false}},
{(pChar) "tensor", {CELL_TYPE_ONNX_TENSOR, onnx::AttributeProto::AttributeType::AttributeProto_AttributeType_TENSOR, false}}
}

A table to locate all the possible ONNX attribute types by their name in the config file "onnx.ini".

The table is a map of strings to an AttributeType: Jazz native type, ONNX protobuf type and a boolean if the attribute is a list.

◆ KIND_SNIPPET

const char jazz_bebop::KIND_SNIPPET[]
Initial value:
= "{\"object\" : BYTE[obj_size], \"body\" : STRING[body_len], \"calls\" : STRING[calls_len],"
"\"input\" : STRING[input_len], \"output\" : STRING[output_len], \"reads\" : STRING[reads_len],"
"\"source\" : STRING[source_len], \"writes\" : STRING[writes_len]}"

The kind of a Snippet

◆ EMPTY_SNIPPET

const char jazz_bebop::EMPTY_SNIPPET[]
Initial value:
= "(\"object\" : [], \"body\" : [NA], \"calls\" : [NA], \"input\" : [NA], \"output\" : [NA],"
"\"reads\" : [NA], \"source\" : [NA], \"writes\" : [NA])"

The empty Snippet

◆ SNIPPET_VERSION

const char jazz_bebop::SNIPPET_VERSION[] = "snp1"

The content of the attribute BLOCK_ATTRIB_SNIPVERS.

The empty Snippet