Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
0d27c2bc
Commit
0d27c2bc
authored
Oct 31, 2022
by
umangyadav
Browse files
formatting
parent
6d86ff54
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
27 deletions
+29
-27
src/program.cpp
src/program.cpp
+4
-4
src/targets/gpu/include/migraphx/gpu/context.hpp
src/targets/gpu/include/migraphx/gpu/context.hpp
+8
-7
src/targets/gpu/include/migraphx/gpu/convolution.hpp
src/targets/gpu/include/migraphx/gpu/convolution.hpp
+17
-14
src/version.h.in
src/version.h.in
+0
-2
No files found.
src/program.cpp
View file @
0d27c2bc
...
...
@@ -493,8 +493,9 @@ std::vector<argument> program::eval(parameter_map params, execution_environment
return
ret
;
}
inline
std
::
string
get_migraphx_version
()
{
return
std
::
to_string
(
MIGRAPHX_VERSION_MAJOR
)
+
"."
+
std
::
to_string
(
MIGRAPHX_VERSION_MINOR
);
inline
std
::
string
get_migraphx_version
()
{
return
std
::
to_string
(
MIGRAPHX_VERSION_MAJOR
)
+
"."
+
std
::
to_string
(
MIGRAPHX_VERSION_MINOR
);
}
const
int
program_file_version
=
5
;
...
...
@@ -637,8 +638,7 @@ void program::from_value(const value& v)
auto
migx_version
=
v
.
at
(
"migraphx_version"
).
to
<
std
::
string
>
();
if
(
migx_version
!=
get_migraphx_version
())
{
std
::
clog
<<
"MIGraphX version mismatch, Operators may not be compatbile."
<<
std
::
endl
;
std
::
clog
<<
"MIGraphX version mismatch, Operators may not be compatbile."
<<
std
::
endl
;
}
this
->
impl
->
target_name
=
v
.
at
(
"target"
).
to
<
std
::
string
>
();
...
...
src/targets/gpu/include/migraphx/gpu/context.hpp
View file @
0d27c2bc
...
...
@@ -284,15 +284,16 @@ struct context
std
::
string
v_miopen_version
=
v
.
at
(
"miopen_version"
).
to
<
std
::
string
>
();
std
::
string
current_gfx_arch
=
this
->
current_device
->
get_device_name
();
std
::
size_t
current_cu_count
=
this
->
current_device
->
get_cu_count
();
std
::
string
current_gfx_arch
=
this
->
current_device
->
get_device_name
();
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
)
{
MIGRAPHX_THROW
(
"MIGraphX model was compiled for gfx_arch: "
+
v_gfx_arch
\
+
" with number of CUs="
+
std
::
to_string
(
n_cu_count
)
\
+
", but current device has gfx_arch: "
+
current_gfx_arch
\
+
" 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."
);
MIGRAPHX_THROW
(
"MIGraphX model was compiled for gfx_arch: "
+
v_gfx_arch
+
" with number of CUs="
+
std
::
to_string
(
n_cu_count
)
+
", but current device has gfx_arch: "
+
current_gfx_arch
+
" 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."
);
}
}
#endif
...
...
src/targets/gpu/include/migraphx/gpu/convolution.hpp
View file @
0d27c2bc
...
...
@@ -289,31 +289,34 @@ struct miopen_convolution
solution_ptr
=
miopen_solution
{
ptr
};
if
(
status
!=
miopenStatusSuccess
)
MIGRAPHX_THROW
(
"MIOpen "
+
op
.
name
()
+
": loading convolution solution failed"
);
if
(
status
==
miopenStatusVersionMismatch
)
{
std
::
clog
<<
"MIOpen convolution was compiled with different MIOpen version. But this machine has MIOpen version: "
<<
get_miopen_version
()
<<
", Performance may suffer.\
if
(
status
==
miopenStatusVersionMismatch
)
{
std
::
clog
<<
"MIOpen convolution was compiled with different MIOpen version. "
"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."
<<
std
::
endl
;
<<
std
::
endl
;
}
auto
v
=
ctx
.
to_value
();
auto
v
=
ctx
.
to_value
();
auto
v_gfx_arch
=
v
.
at
(
"gfx_arch"
).
to
<
std
::
string
>
();
auto
v_cu_count
=
v
.
at
(
"cu_count"
);
std
::
size_t
n_cu_count
=
v_cu_count
.
without_key
().
to
<
std
::
size_t
>
();
std
::
string
v_miopen_version
=
v
.
at
(
"miopen_version"
).
to
<
std
::
string
>
();
auto
current_device
=
ctx
.
get_current_device
();
std
::
string
current_gfx_arch
=
current_device
.
get_device_name
();
std
::
size_t
current_cu_count
=
current_device
.
get_cu_count
();
auto
current_device
=
ctx
.
get_current_device
();
std
::
string
current_gfx_arch
=
current_device
.
get_device_name
();
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
)
{
MIGRAPHX_THROW
(
"MIGraphX model was compiled for gfx_arch: "
+
v_gfx_arch
\
+
" with number of CUs="
+
std
::
to_string
(
n_cu_count
)
\
+
", but current device has gfx_arch: "
+
current_gfx_arch
\
+
" 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."
);
MIGRAPHX_THROW
(
"MIGraphX model was compiled for gfx_arch: "
+
v_gfx_arch
+
" with number of CUs="
+
std
::
to_string
(
n_cu_count
)
+
", but current device has gfx_arch: "
+
current_gfx_arch
+
" 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."
);
}
}
}
...
...
src/version.h.in
View file @
0d27c2bc
...
...
@@ -27,6 +27,4 @@
#define MIGRAPHX_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define MIGRAPHX_VERSION_MINOR @PROJECT_VERSION_MINOR@
// clang-format on
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment