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
15177ac0
Commit
15177ac0
authored
Nov 16, 2021
by
Paul
Browse files
Format
parent
f7f61d7a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
src/targets/gpu/mlir.cpp
src/targets/gpu/mlir.cpp
+1
-4
test/gpu/mlir.cpp
test/gpu/mlir.cpp
+6
-6
No files found.
src/targets/gpu/mlir.cpp
100755 → 100644
View file @
15177ac0
...
@@ -437,10 +437,7 @@ std::string dump_mlir(const module& m)
...
@@ -437,10 +437,7 @@ std::string dump_mlir(const module& m)
#else
#else
std
::
string
dump_mlir
(
const
module
&
)
std
::
string
dump_mlir
(
const
module
&
)
{
return
{};
}
{
return
{};
}
#endif
#endif
...
...
test/gpu/mlir.cpp
View file @
15177ac0
...
@@ -44,7 +44,7 @@ si64]} : (tensor<1x8x4x4xf32>, tensor<2x8x3x3xf32>) -> tensor<1x2x2x2xf32>
...
@@ -44,7 +44,7 @@ si64]} : (tensor<1x8x4x4xf32>, tensor<2x8x3x3xf32>) -> tensor<1x2x2x2xf32>
m
.
add_instruction
(
migraphx
::
make_op
(
"convolution"
),
x
,
w
);
m
.
add_instruction
(
migraphx
::
make_op
(
"convolution"
),
x
,
w
);
auto
s
=
migraphx
::
gpu
::
dump_mlir
(
m
);
auto
s
=
migraphx
::
gpu
::
dump_mlir
(
m
);
// Skip test if MLIR is not enabled
// Skip test if MLIR is not enabled
if
(
s
.
empty
())
if
(
s
.
empty
())
return
;
return
;
EXPECT
(
encode
(
s
)
==
encode
(
mlir_output
));
EXPECT
(
encode
(
s
)
==
encode
(
mlir_output
));
}
}
...
@@ -69,7 +69,7 @@ module {
...
@@ -69,7 +69,7 @@ module {
m
.
add_instruction
(
migraphx
::
make_op
(
"relu"
),
add
);
m
.
add_instruction
(
migraphx
::
make_op
(
"relu"
),
add
);
auto
s
=
migraphx
::
gpu
::
dump_mlir
(
m
);
auto
s
=
migraphx
::
gpu
::
dump_mlir
(
m
);
// Skip test if MLIR is not enabled
// Skip test if MLIR is not enabled
if
(
s
.
empty
())
if
(
s
.
empty
())
return
;
return
;
EXPECT
(
encode
(
s
)
==
encode
(
mlir_output
));
EXPECT
(
encode
(
s
)
==
encode
(
mlir_output
));
}
}
...
...
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