Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions onnxruntime/core/providers/migraphx/migraphx_execution_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -466,25 +466,17 @@ static bool IsUnsupportedOpMode(const onnxruntime::GraphViewer& graph_viewer, co
}

const auto& attributes = node->GetAttributes();
// Pad only support constant mode
// Pad only support reflect, constant and edge mode currently
auto mode_attr = attributes.find("mode");
std::string mode = "constant";
if (mode_attr != attributes.end()) {
mode = (*mode_attr).second.s();
}
static const std::set<std::string> allowed_modes = {"constant", "reflect"};
static const std::set<std::string> allowed_modes = {"constant", "reflect", "edge"};
if (allowed_modes.count(mode) == 0) {
return true;
}

// input value only applied to constant mode
if (mode == "constant") {
if (args.size() == 3) {
if (!canEvalNodeArgument(graph_viewer, node, {2}, input_nodes)) {
return true;
}
}
}
} else if (optype == "Range") {
auto arg_num = node->InputDefs().size();
std::vector<std::size_t> vec(arg_num);
Expand Down