"...composable_kernel_rocm.git" did not exist on "f71203425ead5f60a2ad688962ad22adc7a99779"
Commit 5032c8c6 authored by Manupa Karunaratne's avatar Manupa Karunaratne
Browse files

Disable trailing pointwise fusion in MLIR

This commit inverts the self_decide logic to be
that standalone convs/dots are enabled by default
and fusion is disabled
parent dcc7b0a5
...@@ -357,31 +357,23 @@ bool is_requested(std::string_view option) ...@@ -357,31 +357,23 @@ bool is_requested(std::string_view option)
return contains(options, option); return contains(options, option);
} }
bool is_enabled(std::string_view op_name, context* ctx) bool is_enabled(std::string_view op_name)
{ {
if(is_self_decide()) if(is_self_decide())
{ {
if(op_name == "fused") if(op_name == "fused")
{ {
return true; return false;
} }
else if(op_name == "convolution" or op_name == "quant_convolution") if(op_name == "dot")
{ {
if(ctx == nullptr) return true;
{
return false;
}
else
{
const auto& device = ctx->get_current_device();
const std::string navi_family{"gfx110"};
return starts_with(device.get_gfx_name(), navi_family);
}
} }
else if(op_name == "convolution")
{ {
return false; return true;
} }
return false;
} }
return is_requested(op_name); return is_requested(op_name);
} }
...@@ -392,17 +384,17 @@ bool is_enabled(std::string_view op_name, context* ctx) ...@@ -392,17 +384,17 @@ bool is_enabled(std::string_view op_name, context* ctx)
void fuse_mlir::apply(module_pass_manager& mpm) const void fuse_mlir::apply(module_pass_manager& mpm) const
{ {
#ifdef MIGRAPHX_MLIR #ifdef MIGRAPHX_MLIR
if(is_enabled("fused", this->ctx)) if(is_enabled("fused"))
{ {
match::find_matches(mpm, find_mlir_fused_ops{}); match::find_matches(mpm, find_mlir_fused_ops{});
} }
if(is_enabled("convolution", this->ctx)) if(is_enabled("convolution"))
{ {
match::find_matches(mpm, find_mlir_standalone_convolution_op{}); match::find_matches(mpm, find_mlir_standalone_convolution_op{});
} }
if(is_enabled("dot", this->ctx)) if(is_enabled("dot"))
{ {
match::find_matches(mpm, find_mlir_standalone_dot_op{}); match::find_matches(mpm, find_mlir_standalone_dot_op{});
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment