C++ Reference#

Applies to Linux

2023-10-10

19 min read time

shape#

enum migraphx_shape_datatype_t#

An enum to represent the different data type inputs.

Values:

enumerator migraphx_shape_tuple_type#
enumerator migraphx_shape_bool_type#
enumerator migraphx_shape_half_type#
enumerator migraphx_shape_float_type#
enumerator migraphx_shape_double_type#
enumerator migraphx_shape_uint8_type#
enumerator migraphx_shape_int8_type#
enumerator migraphx_shape_uint16_type#
enumerator migraphx_shape_int16_type#
enumerator migraphx_shape_int32_type#
enumerator migraphx_shape_int64_type#
enumerator migraphx_shape_uint32_type#
enumerator migraphx_shape_uint64_type#
template<class Lens, class Strides>
struct shape : public migraphx::handle_base<>#

Describe shape of tensor.

A shape consists of a data type, lengths of multi-dimension tensor, and strides

argument#

struct argument : public migraphx::handle_base<>#

Arguments to be passed to an migraphx arguments.

An argument represents a raw buffer of data with a shape.

target#

struct target : public migraphx::handle_base<>#

A target for compilation.

program#

struct program_parameter_shapes : public migraphx::handle_base<>#
struct program_parameters : public migraphx::handle_base<>#

A class to construct the inputs parameters for a program.

struct migraphx_compile_options#
struct program : public migraphx::handle_base<>#

A program represents the all computation graphs to be compiled and executed.

quantize#

struct quantize_op_names : public migraphx::handle_base<>#

Warning

doxygenfunction: Unable to resolve function “migraphx::quantize_fp16” with arguments “(const program&)”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 16] MIGRAPHX_EXPORT void quantize_fp16 (program &prog, const std::vector< std::string > &ins_names={“all”}) —————-^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] MIGRAPHX_EXPORT void quantize_fp16 (program &prog, const std::vector< std::string > &ins_names={“all”}) ——————–^ If declarator-id: Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] MIGRAPHX_EXPORT void quantize_fp16 (program &prog, const std::vector< std::string > &ins_names={“all”}) ——————–^

Warning

doxygenfunction: Unable to resolve function “migraphx::quantize_fp16” with arguments “(const program&, const quantize_op_names&)”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 16] MIGRAPHX_EXPORT void quantize_fp16 (program &prog, const std::vector< std::string > &ins_names={“all”}) —————-^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] MIGRAPHX_EXPORT void quantize_fp16 (program &prog, const std::vector< std::string > &ins_names={“all”}) ——————–^ If declarator-id: Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] MIGRAPHX_EXPORT void quantize_fp16 (program &prog, const std::vector< std::string > &ins_names={“all”}) ——————–^

struct quantize_int8_options : public migraphx::handle_base<>#

Options to be passed when quantizing for int8.

Warning

doxygenfunction: Unable to resolve function “migraphx::quantize_int8” with arguments “None”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 16] MIGRAPHX_EXPORT void quantize_int8 (program &prog, const target &t, const std::vector< parameter_map > &calibration, const std::vector< std::string > &ins_names={“dot”, “convolution”}) —————-^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] MIGRAPHX_EXPORT void quantize_int8 (program &prog, const target &t, const std::vector< parameter_map > &calibration, const std::vector< std::string > &ins_names={“dot”, “convolution”}) ——————–^ If declarator-id: Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] MIGRAPHX_EXPORT void quantize_int8 (program &prog, const target &t, const std::vector< parameter_map > &calibration, const std::vector< std::string > &ins_names={“dot”, “convolution”}) ——————–^

parse_onnx#

struct onnx_options : public migraphx::handle_base<>#

Options for parsing onnx options.

Warning

doxygenfunction: Unable to resolve function “migraphx::parse_onnx” with arguments “(const char*)”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 21] MIGRAPHX_ONNX_EXPORT program parse_onnx (const std::string &name, const onnx_options &=onnx_options{}) ———————^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] MIGRAPHX_ONNX_EXPORT program parse_onnx (const std::string &name, const onnx_options &=onnx_options{}) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] MIGRAPHX_ONNX_EXPORT program parse_onnx (const std::string &name, const onnx_options &=onnx_options{}) —————————–^

Warning

doxygenfunction: Unable to resolve function “migraphx::parse_onnx” with arguments “(const char*, const migraphx::onnx_options&)”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 21] MIGRAPHX_ONNX_EXPORT program parse_onnx (const std::string &name, const onnx_options &=onnx_options{}) ———————^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] MIGRAPHX_ONNX_EXPORT program parse_onnx (const std::string &name, const onnx_options &=onnx_options{}) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] MIGRAPHX_ONNX_EXPORT program parse_onnx (const std::string &name, const onnx_options &=onnx_options{}) —————————–^

Warning

doxygenfunction: Unable to resolve function “migraphx::parse_onnx_buffer” with arguments “(const std::string&)”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 21] MIGRAPHX_ONNX_EXPORT program parse_onnx_buffer (const std::string &buffer, const onnx_options &options) ———————^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] MIGRAPHX_ONNX_EXPORT program parse_onnx_buffer (const std::string &buffer, const onnx_options &options) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] MIGRAPHX_ONNX_EXPORT program parse_onnx_buffer (const std::string &buffer, const onnx_options &options) —————————–^

Warning

doxygenfunction: Unable to resolve function “migraphx::parse_onnx_buffer” with arguments “(const std::string&, const migraphx::onnx_options&)”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 21] MIGRAPHX_ONNX_EXPORT program parse_onnx_buffer (const std::string &buffer, const onnx_options &options) ———————^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] MIGRAPHX_ONNX_EXPORT program parse_onnx_buffer (const std::string &buffer, const onnx_options &options) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] MIGRAPHX_ONNX_EXPORT program parse_onnx_buffer (const std::string &buffer, const onnx_options &options) —————————–^

Warning

doxygenfunction: Unable to resolve function “migraphx::parse_onnx_buffer” with arguments “(const void*, size_t)”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 21] MIGRAPHX_ONNX_EXPORT program parse_onnx_buffer (const std::string &buffer, const onnx_options &options) ———————^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] MIGRAPHX_ONNX_EXPORT program parse_onnx_buffer (const std::string &buffer, const onnx_options &options) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] MIGRAPHX_ONNX_EXPORT program parse_onnx_buffer (const std::string &buffer, const onnx_options &options) —————————–^

Warning

doxygenfunction: Unable to resolve function “migraphx::parse_onnx_buffer” with arguments “(const void*, size_t, const migraphx::onnx_options&)”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 21] MIGRAPHX_ONNX_EXPORT program parse_onnx_buffer (const std::string &buffer, const onnx_options &options) ———————^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] MIGRAPHX_ONNX_EXPORT program parse_onnx_buffer (const std::string &buffer, const onnx_options &options) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] MIGRAPHX_ONNX_EXPORT program parse_onnx_buffer (const std::string &buffer, const onnx_options &options) —————————–^

load#

struct migraphx_file_options#

Warning

doxygenfunction: Unable to resolve function “migraphx::load” with arguments “(const char*)”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 16] MIGRAPHX_EXPORT program load (const std::string &filename, const file_options &options=file_options{}) —————-^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 24] MIGRAPHX_EXPORT program load (const std::string &filename, const file_options &options=file_options{}) ————————^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 24] MIGRAPHX_EXPORT program load (const std::string &filename, const file_options &options=file_options{}) ————————^

Warning

doxygenfunction: Unable to resolve function “migraphx::load” with arguments “(const char*, migraphx_file_options)”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 16] MIGRAPHX_EXPORT program load (const std::string &filename, const file_options &options=file_options{}) —————-^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 24] MIGRAPHX_EXPORT program load (const std::string &filename, const file_options &options=file_options{}) ————————^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 24] MIGRAPHX_EXPORT program load (const std::string &filename, const file_options &options=file_options{}) ————————^

save#

Warning

doxygenfunction: Unable to resolve function “migraphx::save” with arguments “(const program&, const char*)”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 16] MIGRAPHX_EXPORT void save (const program &p, const std::string &filename, const file_options &options=file_options{}) —————-^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] MIGRAPHX_EXPORT void save (const program &p, const std::string &filename, const file_options &options=file_options{}) ——————–^ If declarator-id: Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] MIGRAPHX_EXPORT void save (const program &p, const std::string &filename, const file_options &options=file_options{}) ——————–^

Warning

doxygenfunction: Unable to resolve function “migraphx::save” with arguments “(const program&, const char*, migraphx_file_options)”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 16] MIGRAPHX_EXPORT void save (const program &p, const std::string &filename, const file_options &options=file_options{}) —————-^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] MIGRAPHX_EXPORT void save (const program &p, const std::string &filename, const file_options &options=file_options{}) ——————–^ If declarator-id: Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] MIGRAPHX_EXPORT void save (const program &p, const std::string &filename, const file_options &options=file_options{}) ——————–^