Commit 0d27c2bc authored by umangyadav's avatar umangyadav
Browse files

formatting

parent 6d86ff54
...@@ -493,8 +493,9 @@ std::vector<argument> program::eval(parameter_map params, execution_environment ...@@ -493,8 +493,9 @@ std::vector<argument> program::eval(parameter_map params, execution_environment
return ret; return ret;
} }
inline std::string get_migraphx_version() { inline std::string get_migraphx_version()
return std::to_string(MIGRAPHX_VERSION_MAJOR) + "." +std::to_string(MIGRAPHX_VERSION_MINOR); {
return std::to_string(MIGRAPHX_VERSION_MAJOR) + "." + std::to_string(MIGRAPHX_VERSION_MINOR);
} }
const int program_file_version = 5; const int program_file_version = 5;
...@@ -637,8 +638,7 @@ void program::from_value(const value& v) ...@@ -637,8 +638,7 @@ void program::from_value(const value& v)
auto migx_version = v.at("migraphx_version").to<std::string>(); auto migx_version = v.at("migraphx_version").to<std::string>();
if(migx_version != get_migraphx_version()) if(migx_version != get_migraphx_version())
{ {
std::clog << "MIGraphX version mismatch, Operators may not be compatbile." std::clog << "MIGraphX version mismatch, Operators may not be compatbile." << std::endl;
<< std::endl;
} }
this->impl->target_name = v.at("target").to<std::string>(); this->impl->target_name = v.at("target").to<std::string>();
......
...@@ -288,11 +288,12 @@ struct context ...@@ -288,11 +288,12 @@ struct context
std::size_t current_cu_count = this->current_device->get_cu_count(); std::size_t current_cu_count = this->current_device->get_cu_count();
if(n_cu_count != current_cu_count or v_gfx_arch != current_gfx_arch) if(n_cu_count != current_cu_count or v_gfx_arch != current_gfx_arch)
{ {
MIGRAPHX_THROW("MIGraphX model was compiled for gfx_arch: " + v_gfx_arch \ MIGRAPHX_THROW("MIGraphX model was compiled for gfx_arch: " + v_gfx_arch +
+ " with number of CUs=" + std::to_string(n_cu_count) \ " with number of CUs=" + std::to_string(n_cu_count) +
+ ", but current device has gfx_arch: " + current_gfx_arch \ ", but current device has gfx_arch: " + current_gfx_arch +
+ " with number of CUs=" + std::to_string(current_cu_count) \ " with number of CUs=" + std::to_string(current_cu_count) +
+ ", performance may suffer. Consider re-compiling the model with environment variable MIOPEN_FIND_ENFORCE=3 to re-tune the model."); ", performance may suffer. Consider re-compiling the model with "
"environment variable MIOPEN_FIND_ENFORCE=3 to re-tune the model.");
} }
} }
#endif #endif
......
...@@ -289,10 +289,11 @@ struct miopen_convolution ...@@ -289,10 +289,11 @@ struct miopen_convolution
solution_ptr = miopen_solution{ptr}; solution_ptr = miopen_solution{ptr};
if(status != miopenStatusSuccess) if(status != miopenStatusSuccess)
MIGRAPHX_THROW("MIOpen " + op.name() + ": loading convolution solution failed"); MIGRAPHX_THROW("MIOpen " + op.name() + ": loading convolution solution failed");
if(status == miopenStatusVersionMismatch) { if(status == miopenStatusVersionMismatch)
std::clog << "MIOpen convolution was compiled with different MIOpen version. But this machine has MIOpen version: " << {
get_miopen_version() std::clog << "MIOpen convolution was compiled with different MIOpen version. "
<< ", Performance may suffer.\ "But this machine has MIOpen version: "
<< get_miopen_version() << ", Performance may suffer.\
Consider re-compiling the model with environment variable MIOPEN_FIND_ENFORCE=3 to re-tune the model." Consider re-compiling the model with environment variable MIOPEN_FIND_ENFORCE=3 to re-tune the model."
<< std::endl; << std::endl;
} }
...@@ -309,11 +310,13 @@ struct miopen_convolution ...@@ -309,11 +310,13 @@ struct miopen_convolution
std::size_t current_cu_count = current_device.get_cu_count(); std::size_t current_cu_count = current_device.get_cu_count();
if(n_cu_count != current_cu_count or v_gfx_arch != current_gfx_arch) if(n_cu_count != current_cu_count or v_gfx_arch != current_gfx_arch)
{ {
MIGRAPHX_THROW("MIGraphX model was compiled for gfx_arch: " + v_gfx_arch \ MIGRAPHX_THROW(
+ " with number of CUs=" + std::to_string(n_cu_count) \ "MIGraphX model was compiled for gfx_arch: " + v_gfx_arch +
+ ", but current device has gfx_arch: " + current_gfx_arch \ " with number of CUs=" + std::to_string(n_cu_count) +
+ " with number of CUs=" + std::to_string(current_cu_count) \ ", but current device has gfx_arch: " + current_gfx_arch +
+ ", performance may suffer. Consider re-compiling the model with environment variable MIOPEN_FIND_ENFORCE=3 to re-tune the model."); " with number of CUs=" + std::to_string(current_cu_count) +
", performance may suffer. Consider re-compiling the model with "
"environment variable MIOPEN_FIND_ENFORCE=3 to re-tune the model.");
} }
} }
} }
......
...@@ -27,6 +27,4 @@ ...@@ -27,6 +27,4 @@
#define MIGRAPHX_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ #define MIGRAPHX_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define MIGRAPHX_VERSION_MINOR @PROJECT_VERSION_MINOR@ #define MIGRAPHX_VERSION_MINOR @PROJECT_VERSION_MINOR@
// clang-format on // clang-format on
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