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
49fc6138
Unverified
Commit
49fc6138
authored
Mar 28, 2023
by
Umang Yadav
Committed by
GitHub
Mar 28, 2023
Browse files
Remove version name from check_context (#1639)
* Remove version from check_context and bump program version
parent
7c4dc99a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
13 deletions
+31
-13
examples/migraphx/migraphx_driver/README.md
examples/migraphx/migraphx_driver/README.md
+8
-8
src/include/migraphx/check_context.hpp
src/include/migraphx/check_context.hpp
+23
-1
src/py/migraphx_py.cpp
src/py/migraphx_py.cpp
+0
-1
src/targets/gpu/include/migraphx/gpu/oper.hpp
src/targets/gpu/include/migraphx/gpu/oper.hpp
+0
-1
src/targets/gpu/include/migraphx/gpu/prefix_scan_sum.hpp
src/targets/gpu/include/migraphx/gpu/prefix_scan_sum.hpp
+0
-1
src/targets/gpu/include/migraphx/gpu/reduce_op.hpp
src/targets/gpu/include/migraphx/gpu/reduce_op.hpp
+0
-1
No files found.
examples/migraphx/migraphx_driver/README.md
View file @
49fc6138
...
@@ -88,7 +88,7 @@ batch_norm_inference
...
@@ -88,7 +88,7 @@ batch_norm_inference
broadcast
broadcast
capture
capture
ceil
ceil
check_context::migraphx::
version_1::
gpu::context
check_context::migraphx::gpu::context
clip
clip
concat
concat
contiguous
contiguous
...
@@ -304,7 +304,7 @@ $ /opt/rocm/bin/migraphx-driver run --onnx simple_graph.onnx
...
@@ -304,7 +304,7 @@ $ /opt/rocm/bin/migraphx-driver run --onnx simple_graph.onnx
```
```
Compiling ...
Compiling ...
Reading: simple_graph.onnx
Reading: simple_graph.onnx
@0 = check_context::migraphx::
version_1::
gpu::context -> float_type, {}, {}
@0 = check_context::migraphx::gpu::context -> float_type, {}, {}
@1 = hip::hip_allocate_memory[shape=float_type, {256}, {1},id=scratch] -> float_type, {256}, {1}
@1 = hip::hip_allocate_memory[shape=float_type, {256}, {1},id=scratch] -> float_type, {256}, {1}
@2 = hip::hip_copy_literal[id=@literal:1] -> float_type, {784, 128}, {128, 1}
@2 = hip::hip_copy_literal[id=@literal:1] -> float_type, {784, 128}, {128, 1}
x:0 = @param:x:0 -> float_type, {1, 28, 28}, {784, 28, 1}
x:0 = @param:x:0 -> float_type, {1, 28, 28}, {784, 28, 1}
...
@@ -327,7 +327,7 @@ x:0 = @param:x:0 -> float_type, {1, 28, 28}, {784, 28, 1}
...
@@ -327,7 +327,7 @@ x:0 = @param:x:0 -> float_type, {1, 28, 28}, {784, 28, 1}
@18 = @return(@17)
@18 = @return(@17)
Allocating params ...
Allocating params ...
@0 = check_context::migraphx::
version_1::
gpu::context -> float_type, {}, {}
@0 = check_context::migraphx::gpu::context -> float_type, {}, {}
@1 = hip::hip_allocate_memory[shape=float_type, {256}, {1},id=scratch] -> float_type, {256}, {1}
@1 = hip::hip_allocate_memory[shape=float_type, {256}, {1},id=scratch] -> float_type, {256}, {1}
@2 = hip::hip_copy_literal[id=@literal:1] -> float_type, {784, 128}, {128, 1}
@2 = hip::hip_copy_literal[id=@literal:1] -> float_type, {784, 128}, {128, 1}
x:0 = @param:x:0 -> float_type, {1, 28, 28}, {784, 28, 1}
x:0 = @param:x:0 -> float_type, {1, 28, 28}, {784, 28, 1}
...
@@ -399,7 +399,7 @@ $ /opt/rocm/bin/migraphx-driver compile --gpu --fp16 simple_graph.pb
...
@@ -399,7 +399,7 @@ $ /opt/rocm/bin/migraphx-driver compile --gpu --fp16 simple_graph.pb
```
```
Compiling ...
Compiling ...
Reading: simple_graph.pb
Reading: simple_graph.pb
@0 = check_context::migraphx::
version_1::
gpu::context -> float_type, {}, {}
@0 = check_context::migraphx::gpu::context -> float_type, {}, {}
@1 = hip::hip_allocate_memory[shape=float_type, {456}, {1},id=scratch] -> float_type, {456}, {1}
@1 = hip::hip_allocate_memory[shape=float_type, {456}, {1},id=scratch] -> float_type, {456}, {1}
@2 = hip::hip_copy_literal[id=@literal:0] -> half_type, {784, 128}, {128, 1}
@2 = hip::hip_copy_literal[id=@literal:0] -> half_type, {784, 128}, {128, 1}
@3 = load[offset=256,end=1824](@1) -> half_type, {1, 28, 28}, {784, 28, 1}
@3 = load[offset=256,end=1824](@1) -> half_type, {1, 28, 28}, {784, 28, 1}
...
@@ -502,7 +502,7 @@ x = @param:x -> float_type, {1, 28, 28}, {784, 28, 1}
...
@@ -502,7 +502,7 @@ x = @param:x -> float_type, {1, 28, 28}, {784, 28, 1}
@18 = ref::softmax[axis=1](@17) -> float_type, {1, 10}, {10, 1}
@18 = ref::softmax[axis=1](@17) -> float_type, {1, 10}, {10, 1}
@19 = ref::identity(@18) -> float_type, {1, 10}, {10, 1}
@19 = ref::identity(@18) -> float_type, {1, 10}, {10, 1}
@0 = check_context::migraphx::
version_1::
gpu::context -> float_type, {}, {}
@0 = check_context::migraphx::gpu::context -> float_type, {}, {}
@1 = hip::hip_allocate_memory[shape=float_type, {256}, {1},id=scratch] -> float_type, {256}, {1}
@1 = hip::hip_allocate_memory[shape=float_type, {256}, {1},id=scratch] -> float_type, {256}, {1}
@2 = hip::hip_copy_literal[id=@literal:3] -> float_type, {784, 128}, {128, 1}
@2 = hip::hip_copy_literal[id=@literal:3] -> float_type, {784, 128}, {128, 1}
x = @param:x -> float_type, {1, 28, 28}, {784, 28, 1}
x = @param:x -> float_type, {1, 28, 28}, {784, 28, 1}
...
@@ -538,7 +538,7 @@ $ /opt/rocm/bin/migraphx-driver perf simple_graph.pb
...
@@ -538,7 +538,7 @@ $ /opt/rocm/bin/migraphx-driver perf simple_graph.pb
```
```
Compiling ...
Compiling ...
Reading: simple_graph.pb
Reading: simple_graph.pb
@0 = check_context::migraphx::
version_1::
gpu::context -> float_type, {}, {}
@0 = check_context::migraphx::gpu::context -> float_type, {}, {}
@1 = hip::hip_allocate_memory[shape=float_type, {256}, {1},id=scratch] -> float_type, {256}, {1}
@1 = hip::hip_allocate_memory[shape=float_type, {256}, {1},id=scratch] -> float_type, {256}, {1}
@2 = hip::hip_copy_literal[id=@literal:3] -> float_type, {784, 128}, {128, 1}
@2 = hip::hip_copy_literal[id=@literal:3] -> float_type, {784, 128}, {128, 1}
@3 = load[offset=0,end=512](@1) -> float_type, {1, 128}, {128, 1}
@3 = load[offset=0,end=512](@1) -> float_type, {1, 128}, {128, 1}
...
@@ -561,7 +561,7 @@ output = @param:output -> float_type, {1, 10}, {10, 1}
...
@@ -561,7 +561,7 @@ output = @param:output -> float_type, {1, 10}, {10, 1}
Allocating params ...
Allocating params ...
Running performance report ...
Running performance report ...
@0 = check_context::migraphx::
version_1::
gpu::context -> float_type, {}, {}: 0.00057782ms, 1%
@0 = check_context::migraphx::gpu::context -> float_type, {}, {}: 0.00057782ms, 1%
@1 = hip::hip_allocate_memory[shape=float_type, {256}, {1},id=scratch] -> float_type, {256}, {1}: 0.000295ms, 1%
@1 = hip::hip_allocate_memory[shape=float_type, {256}, {1},id=scratch] -> float_type, {256}, {1}: 0.000295ms, 1%
@2 = hip::hip_copy_literal[id=@literal:3] -> float_type, {784, 128}, {128, 1}: 0.00027942ms, 1%
@2 = hip::hip_copy_literal[id=@literal:3] -> float_type, {784, 128}, {128, 1}: 0.00027942ms, 1%
@3 = load[offset=0,end=512](@1) -> float_type, {1, 128}, {128, 1}: 0.000232ms, 1%
@3 = load[offset=0,end=512](@1) -> float_type, {1, 128}, {128, 1}: 0.000232ms, 1%
...
@@ -591,7 +591,7 @@ hip::hip_copy_literal: 0.00186824ms, 1%
...
@@ -591,7 +591,7 @@ hip::hip_copy_literal: 0.00186824ms, 1%
load: 0.0016288ms, 1%
load: 0.0016288ms, 1%
@param: 0.0013428ms, 1%
@param: 0.0013428ms, 1%
broadcast: 0.00118042ms, 1%
broadcast: 0.00118042ms, 1%
check_context::migraphx::
version_1::
gpu::context: 0.00057782ms, 1%
check_context::migraphx::gpu::context: 0.00057782ms, 1%
reshape: 0.00033842ms, 1%
reshape: 0.00033842ms, 1%
hip::hip_allocate_memory: 0.000295ms, 1%
hip::hip_allocate_memory: 0.000295ms, 1%
...
...
src/include/migraphx/check_context.hpp
View file @
49fc6138
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
#include <migraphx/program.hpp>
#include <migraphx/program.hpp>
#include <migraphx/config.hpp>
#include <migraphx/config.hpp>
#include <migraphx/register_op.hpp>
#include <migraphx/register_op.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/ranges.hpp>
namespace
migraphx
{
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
inline
namespace
MIGRAPHX_INLINE_NS
{
...
@@ -36,7 +38,27 @@ struct check_context
...
@@ -36,7 +38,27 @@ struct check_context
{
{
struct
op
:
auto_register_op
<
op
>
struct
op
:
auto_register_op
<
op
>
{
{
std
::
string
name
()
const
{
return
"check_context::"
+
get_type_name
<
T
>
();
}
static
std
::
string
compute_op_name
()
{
const
auto
&
op_type_name
=
get_type_name
<
T
>
();
const
auto
&
split_name
=
split_string
(
op_type_name
,
':'
);
std
::
vector
<
std
::
string
>
name_without_version
=
{
"check_context"
};
// op_type_name would contain internal namespace name with version_x_y_z
// remove version and construct op_name such as check_context::migraphx::gpu::context
std
::
copy_if
(
split_name
.
begin
(),
split_name
.
end
(),
std
::
back_inserter
(
name_without_version
),
[
&
](
const
auto
&
i
)
{
return
not
i
.
empty
()
and
not
contains
(
i
,
"version"
);
});
return
join_strings
(
name_without_version
,
"::"
);
}
std
::
string
name
()
const
{
static
auto
op_name
=
compute_op_name
();
return
op_name
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
)
const
{
return
{};
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
)
const
{
return
{};
}
argument
compute
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
argument
>&
)
const
argument
compute
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
argument
>&
)
const
{
{
...
...
src/py/migraphx_py.cpp
View file @
49fc6138
...
@@ -35,7 +35,6 @@
...
@@ -35,7 +35,6 @@
#include <migraphx/stringutils.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/tf.hpp>
#include <migraphx/tf.hpp>
#include <migraphx/onnx.hpp>
#include <migraphx/onnx.hpp>
#include <migraphx/type_name.hpp>
#include <migraphx/load_save.hpp>
#include <migraphx/load_save.hpp>
#include <migraphx/register_target.hpp>
#include <migraphx/register_target.hpp>
#include <migraphx/json.hpp>
#include <migraphx/json.hpp>
...
...
src/targets/gpu/include/migraphx/gpu/oper.hpp
View file @
49fc6138
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/config.hpp>
#include <migraphx/reduce_dims.hpp>
#include <migraphx/reduce_dims.hpp>
#include <migraphx/type_name.hpp>
#include <utility>
#include <utility>
#include <iostream>
#include <iostream>
...
...
src/targets/gpu/include/migraphx/gpu/prefix_scan_sum.hpp
View file @
49fc6138
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
#include <migraphx/shape.hpp>
#include <migraphx/shape.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/config.hpp>
#include <migraphx/type_name.hpp>
#include <utility>
#include <utility>
#include <iostream>
#include <iostream>
...
...
src/targets/gpu/include/migraphx/gpu/reduce_op.hpp
View file @
49fc6138
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
#include <migraphx/shape.hpp>
#include <migraphx/shape.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/config.hpp>
#include <migraphx/type_name.hpp>
#include <utility>
#include <utility>
#include <iostream>
#include <iostream>
...
...
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