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
427bbe21
"vscode:/vscode.git/clone" did not exist on "c55e4d60ced22c2773964de24f8aef89dbd7110d"
Commit
427bbe21
authored
May 01, 2019
by
Shucai Xiao
Browse files
changed a scenario and fixed two test cases.
parent
cfe5234e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
src/eliminate_contiguous.cpp
src/eliminate_contiguous.cpp
+3
-4
test/eliminate_contiguous_test.cpp
test/eliminate_contiguous_test.cpp
+1
-1
test/gpu/adjust_allocation.cpp
test/gpu/adjust_allocation.cpp
+1
-1
No files found.
src/eliminate_contiguous.cpp
View file @
427bbe21
...
...
@@ -28,12 +28,11 @@ static bool try_compute_shape(instruction_ref ins, const std::vector<shape>& inp
auto
outputs
=
ins
->
outputs
();
// If the current instruction has no output, it means it is the last
// instruction and generates a non-standard output. But for unary
// and binary operators, we can still remove it and reshape the output
// to be standard since these operator can handle non-standard inputs
// instruction and generates a non-standard output shape, and the last
// output shape is different from the case with the contiguous operator
if
(
outputs
.
empty
())
{
return
tru
e
;
return
fals
e
;
}
for
(
auto
output
:
outputs
)
...
...
test/eliminate_contiguous_test.cpp
View file @
427bbe21
...
...
@@ -40,7 +40,7 @@ TEST_CASE(non_standard_op)
p
.
add_instruction
(
pass_op
{},
c
);
auto
count
=
std
::
distance
(
p
.
begin
(),
p
.
end
());
p
.
compile
(
eliminate_contiguous_target
{});
EXPECT
(
std
::
distance
(
p
.
begin
(),
p
.
end
())
==
(
count
-
1
)
);
EXPECT
(
std
::
distance
(
p
.
begin
(),
p
.
end
())
==
count
);
}
TEST_CASE
(
transpose_gemm
)
...
...
test/gpu/adjust_allocation.cpp
View file @
427bbe21
...
...
@@ -61,7 +61,7 @@ TEST_CASE(tanh_shape)
}
EXPECT
(
p1
!=
p2
);
migraphx
::
run_passes
(
p
2
,
migraphx
::
run_passes
(
p
1
,
{
migraphx
::
gpu
::
adjust_allocation
{},
migraphx
::
dead_code_elimination
{}});
EXPECT
(
p1
==
p2
);
}
...
...
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