Skip to content

Commit bbb13c3

Browse files
authored
fix compilation for v1.19+ (#48)
1 parent 0a17489 commit bbb13c3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

onnxruntime/core/providers/migraphx/migraphx_execution_provider.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ MIGraphXExecutionProvider::GetCapability(const onnxruntime::GraphViewer& graph_v
991991
model_proto->set_ir_version(ONNX_NAMESPACE::Version::IR_VERSION);
992992
std::string onnx_string_buffer;
993993
model_proto->SerializeToString(onnx_string_buffer);
994-
model_path_ = ToUTF8String(graph_viewer.ModelPath().ToPathString());
994+
model_path_ = graph_viewer.ModelPath();
995995

996996
// dump onnx file if environment var is set
997997
if (dump_model_ops_) {
@@ -1170,7 +1170,7 @@ Status MIGraphXExecutionProvider::Compile(const std::vector<FusedNodeAndGraph>&
11701170
auto param_shapes = prog.get_parameter_shapes();
11711171

11721172
// Add all calibration data read in from int8 table
1173-
for (auto& [cal_key, cal_val] : dynamic_range_map) {
1173+
for (auto& [cal_key, cal_val] : dynamic_range_map_) {
11741174
auto cal_val_shape = migraphx::shape(migraphx_shape_float_type);
11751175
quant_params.add(cal_key.c_str(), migraphx::argument(cal_val_shape, static_cast<void*>(std::move(&cal_val))));
11761176
}
@@ -1219,7 +1219,7 @@ Status MIGraphXExecutionProvider::Compile(const std::vector<FusedNodeAndGraph>&
12191219
*p = {context->allocate_func, context->release_func, context->allocator_handle, map_progs_[context->node_name],
12201220
map_onnx_string_[context->node_name], options, t_, map_input_index_[context->node_name], &mgx_mu_,
12211221
map_no_input_shape_[context->node_name], fp16_enable_, int8_enable_,
1222-
int8_calibration_cache_available_, dynamic_range_map,
1222+
int8_calibration_cache_available_, dynamic_range_map_,
12231223
save_compiled_model_, save_compiled_path_,
12241224
load_compiled_model_, load_compiled_path_, dump_model_ops_};
12251225
*state = p.release();

onnxruntime/core/providers/migraphx/migraphx_execution_provider.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class MIGraphXExecutionProvider : public IExecutionProvider {
9292
bool int8_calibration_cache_available_ = false;
9393
bool int8_use_native_migraphx_calibration_table_ = false;
9494
std::string calibration_cache_path_;
95-
std::unordered_map<std::string, float> dynamic_range_map;
95+
std::unordered_map<std::string, float> dynamic_range_map_;
9696
bool save_compiled_model_ = false;
9797
std::string save_compiled_path_;
9898
bool load_compiled_model_ = false;

0 commit comments

Comments
 (0)