"...targets/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "ef738568002fe31f313d10a8be2890eec7687438"
Commit c1a76b61 authored by Paul's avatar Paul
Browse files

Use batch in calculation

parent 8b7ad986
...@@ -169,11 +169,12 @@ auto is_mlir_dot(mlir_mode mode) ...@@ -169,11 +169,12 @@ auto is_mlir_dot(mlir_mode mode)
float m = a.lens()[a.lens().size() - 2]; float m = a.lens()[a.lens().size() - 2];
float n = b.lens().back(); float n = b.lens().back();
float k = a.lens().back(); float k = a.lens().back();
float g = a.elements() / (m*k);
if(k > 1024) if(k > 1024)
return false; return false;
auto ratio = m * n / k; auto ratio = std::sqrt(g) * m * n / k;
std::cout << "gemm_ratio: " << ratio << std::endl; std::cout << "gemm_ratio: " << ratio << std::endl;
if(ratio < 16384) if(ratio < 128*1024)
return false; return false;
return true; return true;
// // Skipping GEMMs with a K dimension greater than 2048 is a course-grained strategy // // Skipping GEMMs with a K dimension greater than 2048 is a course-grained strategy
......
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