Skip to content

Commit

Permalink
Fixed writing the input files for rocMLIR's tuningRunner.py (#2143)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravil-mobile authored Sep 8, 2023
1 parent 1d8840b commit bded094
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/targets/gpu/mlir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "migraphx/make_op.hpp"
#include <migraphx/stringutils.hpp>
#include <migraphx/gpu/mlir.hpp>

#ifdef MIGRAPHX_MLIR
Expand Down Expand Up @@ -719,7 +720,8 @@ struct mlir_program
if(not tuning_cfg_path.empty())
{
std::vector<std::string> tokens = split_string(prob_config, '\t');
std::string prob = tokens[1];
std::string prob = tokens[2];

if(starts_with(prob, "conv"))
{
tuning_cfg_path += ".conv";
Expand All @@ -729,6 +731,8 @@ struct mlir_program
tuning_cfg_path += ".gemm";
}
std::ofstream tuning_cfg(tuning_cfg_path, std::ios::app);
prob =
trim(prob, [](unsigned char c) { return (c == '\0') or (std::isspace(c) != 0); });
tuning_cfg << prob << std::endl;
}
}
Expand Down

0 comments on commit bded094

Please sign in to comment.