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
5b2aeb80
"official/legacy/xlnet/preprocess_pretrain_data.py" did not exist on "6b8bb0cbeb3e10415c7a87448f08adc3c484c1d3"
Commit
5b2aeb80
authored
Apr 05, 2019
by
Shucai Xiao
Browse files
merge develop branch changes.
parents
69e03230
8ba8f907
Changes
105
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
91 additions
and
20 deletions
+91
-20
src/targets/gpu/include/migraphx/gpu/contiguous.hpp
src/targets/gpu/include/migraphx/gpu/contiguous.hpp
+1
-1
src/targets/gpu/include/migraphx/gpu/convolution.hpp
src/targets/gpu/include/migraphx/gpu/convolution.hpp
+1
-1
src/targets/gpu/include/migraphx/gpu/fp_conversion.hpp
src/targets/gpu/include/migraphx/gpu/fp_conversion.hpp
+4
-2
src/targets/gpu/include/migraphx/gpu/gather.hpp
src/targets/gpu/include/migraphx/gpu/gather.hpp
+1
-0
src/targets/gpu/include/migraphx/gpu/gemm.hpp
src/targets/gpu/include/migraphx/gpu/gemm.hpp
+1
-1
src/targets/gpu/include/migraphx/gpu/hip.hpp
src/targets/gpu/include/migraphx/gpu/hip.hpp
+4
-1
src/targets/gpu/include/migraphx/gpu/logsoftmax.hpp
src/targets/gpu/include/migraphx/gpu/logsoftmax.hpp
+1
-1
src/targets/gpu/include/migraphx/gpu/miopen.hpp
src/targets/gpu/include/migraphx/gpu/miopen.hpp
+3
-1
src/targets/gpu/include/migraphx/gpu/pad.hpp
src/targets/gpu/include/migraphx/gpu/pad.hpp
+1
-1
src/targets/gpu/include/migraphx/gpu/pooling.hpp
src/targets/gpu/include/migraphx/gpu/pooling.hpp
+1
-1
src/targets/gpu/include/migraphx/gpu/softmax.hpp
src/targets/gpu/include/migraphx/gpu/softmax.hpp
+1
-1
src/targets/gpu/logsoftmax.cpp
src/targets/gpu/logsoftmax.cpp
+1
-1
test/auto_contiguous_test.cpp
test/auto_contiguous_test.cpp
+2
-1
test/common_subexpression_elimination_test.cpp
test/common_subexpression_elimination_test.cpp
+1
-1
test/constant_propagate_test.cpp
test/constant_propagate_test.cpp
+1
-1
test/cpu_rnn_ops_test.cpp
test/cpu_rnn_ops_test.cpp
+6
-1
test/dead_code_elimination_test.cpp
test/dead_code_elimination_test.cpp
+54
-1
test/eliminate_allocation_test.cpp
test/eliminate_allocation_test.cpp
+2
-1
test/eliminate_concat_test.cpp
test/eliminate_concat_test.cpp
+3
-1
test/eliminate_contiguous_test.cpp
test/eliminate_contiguous_test.cpp
+2
-1
No files found.
src/targets/gpu/include/migraphx/gpu/contiguous.hpp
View file @
5b2aeb80
...
...
@@ -2,7 +2,7 @@
#define MIGRAPHX_GUARD_RTGLIB_CONTIGUOUS_HPP
#include <migraphx/shape.hpp>
#include <migraphx/op
erator
s.hpp>
#include <migraphx/op
/contiguou
s.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
...
...
src/targets/gpu/include/migraphx/gpu/convolution.hpp
View file @
5b2aeb80
...
...
@@ -2,7 +2,7 @@
#define MIGRAPHX_GUARD_RTGLIB_CONVOLUTION_HPP
#include <migraphx/shape.hpp>
#include <migraphx/op
erators
.hpp>
#include <migraphx/op
/convolution
.hpp>
#include <migraphx/gpu/miopen.hpp>
namespace
migraphx
{
...
...
src/targets/gpu/include/migraphx/gpu/fp_conversion.hpp
View file @
5b2aeb80
#ifndef MIGRAPHX_GUARD_RTGLIB_FP_CONVERSION_HPP
#define MIGRAPHX_GUARD_RTGLIB_FP_CONVERSION_HPP
#include <migraphx/
gpu/o
pe
r
.hpp>
#include <migraphx/
gpu/device
/fp_conversion.hpp>
#include <migraphx/
sha
pe.hpp>
#include <migraphx/
op
/fp_conversion.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
struct
context
;
struct
hip_fp_conversion
{
op
::
fp_conversion
op
;
...
...
src/targets/gpu/include/migraphx/gpu/gather.hpp
View file @
5b2aeb80
...
...
@@ -2,6 +2,7 @@
#define MIGRAPHX_GUARD_RTGLIB_GATHER_HPP
#include <migraphx/shape.hpp>
#include <migraphx/op/gather.hpp>
#include <migraphx/gpu/miopen.hpp>
namespace
migraphx
{
...
...
src/targets/gpu/include/migraphx/gpu/gemm.hpp
View file @
5b2aeb80
...
...
@@ -2,7 +2,7 @@
#define MIGRAPHX_GUARD_RTGLIB_GEMM_HPP
#include <migraphx/shape.hpp>
#include <migraphx/op
erators
.hpp>
#include <migraphx/op
/dot
.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
...
...
src/targets/gpu/include/migraphx/gpu/hip.hpp
View file @
5b2aeb80
#ifndef MIGRAPHX_GUARD_MIGRAPHLIB_HIP_HPP
#define MIGRAPHX_GUARD_MIGRAPHLIB_HIP_HPP
#include <migraphx/operators.hpp>
#include <migraphx/config.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/check_shapes.hpp>
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
struct
context
;
argument
allocate_gpu
(
const
shape
&
s
,
bool
host
=
false
);
argument
to_gpu
(
const
argument
&
arg
,
bool
host
=
false
);
...
...
src/targets/gpu/include/migraphx/gpu/logsoftmax.hpp
View file @
5b2aeb80
...
...
@@ -4,7 +4,7 @@
#include <migraphx/gpu/lowering.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/op
erators
.hpp>
#include <migraphx/op
/logsoftmax
.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp>
...
...
src/targets/gpu/include/migraphx/gpu/miopen.hpp
View file @
5b2aeb80
...
...
@@ -2,7 +2,9 @@
#define MIGRAPHX_GUARD_MIGRAPHLIB_MIOPEN_HPP
#include <migraphx/manage_ptr.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/op/convolution.hpp>
#include <migraphx/op/pooling.hpp>
#include <migraphx/op/lrn.hpp>
#include <miopen/miopen.h>
#include <migraphx/config.hpp>
...
...
src/targets/gpu/include/migraphx/gpu/pad.hpp
View file @
5b2aeb80
...
...
@@ -2,7 +2,7 @@
#define MIGRAPHX_GUARD_RTGLIB_PAD_HPP
#include <migraphx/shape.hpp>
#include <migraphx/op
erators
.hpp>
#include <migraphx/op
/pad
.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
...
...
src/targets/gpu/include/migraphx/gpu/pooling.hpp
View file @
5b2aeb80
...
...
@@ -2,7 +2,7 @@
#define MIGRAPHX_GUARD_RTGLIB_POOLING_HPP
#include <migraphx/shape.hpp>
#include <migraphx/op
erators
.hpp>
#include <migraphx/op
/pooling
.hpp>
#include <migraphx/gpu/miopen.hpp>
namespace
migraphx
{
...
...
src/targets/gpu/include/migraphx/gpu/softmax.hpp
View file @
5b2aeb80
...
...
@@ -2,7 +2,7 @@
#define MIGRAPHX_GUARD_RTGLIB_SOFTMAX_HPP
#include <migraphx/shape.hpp>
#include <migraphx/op
erators
.hpp>
#include <migraphx/op
/softmax
.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
...
...
src/targets/gpu/logsoftmax.cpp
View file @
5b2aeb80
#include <migraphx/gpu/logsoftmax.hpp>
#include <migraphx/gpu/device/logsoftmax.hpp>
#include <migraphx/op
erators
.hpp>
#include <migraphx/op
/logsoftmax
.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <utility>
...
...
test/auto_contiguous_test.cpp
View file @
5b2aeb80
#include <migraphx/auto_contiguous.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/op/transpose.hpp>
#include <migraphx/op/broadcast.hpp>
#include <migraphx/instruction.hpp>
#include <basic_ops.hpp>
#include <test.hpp>
...
...
test/common_subexpression_elimination_test.cpp
View file @
5b2aeb80
#include <migraphx/common_subexpression_elimination.hpp>
#include <migraphx/dead_code_elimination.hpp>
#include <migraphx/op
erators
.hpp>
#include <migraphx/op
/add
.hpp>
#include <basic_ops.hpp>
#include <test.hpp>
...
...
test/constant_propagate_test.cpp
View file @
5b2aeb80
#include <migraphx/constant_propagate.hpp>
#include <migraphx/dead_code_elimination.hpp>
#include <migraphx/op
erators
.hpp>
#include <migraphx/op
/add
.hpp>
#include <basic_ops.hpp>
#include <test.hpp>
...
...
test/cpu_rnn_ops_test.cpp
View file @
5b2aeb80
#include <iostream>
#include <vector>
#include <migraphx/literal.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/op/rnn.hpp>
#include <migraphx/op/gru.hpp>
#include <migraphx/op/lstm.hpp>
#include <migraphx/op/rnn_last_output.hpp>
#include <migraphx/op/rnn_last_cell_output.hpp>
#include <migraphx/op/abnormal_ops.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/cpu/target.hpp>
#include <migraphx/verify.hpp>
...
...
test/dead_code_elimination_test.cpp
View file @
5b2aeb80
#include <migraphx/dead_code_elimination.hpp>
#include <basic_ops.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/op/abnormal_ops.hpp>
#include <migraphx/op/add.hpp>
#include <migraphx/op/identity.hpp>
#include <test.hpp>
struct
dce_target
...
...
@@ -129,4 +131,55 @@ TEST_CASE(undefined_test)
EXPECT
(
result
!=
migraphx
::
literal
{
4
});
}
TEST_CASE
(
duplicate_args1
)
{
migraphx
::
program
p
;
auto
l0
=
p
.
add_literal
(
0
);
auto
l3
=
p
.
add_literal
(
3
);
p
.
add_instruction
(
migraphx
::
op
::
add
{},
l3
,
l3
);
p
.
add_instruction
(
migraphx
::
op
::
identity
{},
l0
);
auto
count
=
std
::
distance
(
p
.
begin
(),
p
.
end
());
p
.
compile
(
dce_target
{});
EXPECT
(
std
::
distance
(
p
.
begin
(),
p
.
end
())
!=
count
);
EXPECT
(
std
::
distance
(
p
.
begin
(),
p
.
end
())
==
2
);
auto
result
=
p
.
eval
({});
EXPECT
(
result
==
migraphx
::
literal
{
0
});
}
TEST_CASE
(
duplicate_args2
)
{
migraphx
::
program
p
;
auto
l0
=
p
.
add_literal
(
0
);
auto
l3
=
p
.
add_literal
(
3
);
auto
sum1
=
p
.
add_instruction
(
migraphx
::
op
::
add
{},
l0
,
l3
);
p
.
add_instruction
(
migraphx
::
op
::
add
{},
sum1
,
l3
);
p
.
add_instruction
(
migraphx
::
op
::
identity
{},
l0
);
auto
count
=
std
::
distance
(
p
.
begin
(),
p
.
end
());
p
.
compile
(
dce_target
{});
EXPECT
(
std
::
distance
(
p
.
begin
(),
p
.
end
())
!=
count
);
EXPECT
(
std
::
distance
(
p
.
begin
(),
p
.
end
())
==
2
);
auto
result
=
p
.
eval
({});
EXPECT
(
result
==
migraphx
::
literal
{
0
});
}
TEST_CASE
(
duplicate_args3
)
{
migraphx
::
program
p
;
auto
l0
=
p
.
add_literal
(
0
);
auto
l3
=
p
.
add_literal
(
3
);
auto
sum1
=
p
.
add_instruction
(
migraphx
::
op
::
add
{},
l0
,
l3
);
auto
sum2
=
p
.
add_instruction
(
migraphx
::
op
::
add
{},
l0
,
sum1
);
p
.
add_instruction
(
migraphx
::
op
::
add
{},
sum2
,
l3
);
p
.
add_instruction
(
migraphx
::
op
::
identity
{},
l0
);
auto
count
=
std
::
distance
(
p
.
begin
(),
p
.
end
());
p
.
compile
(
dce_target
{});
EXPECT
(
std
::
distance
(
p
.
begin
(),
p
.
end
())
!=
count
);
EXPECT
(
std
::
distance
(
p
.
begin
(),
p
.
end
())
==
2
);
auto
result
=
p
.
eval
({});
EXPECT
(
result
==
migraphx
::
literal
{
0
});
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
test
::
run
(
argc
,
argv
);
}
test/eliminate_allocation_test.cpp
View file @
5b2aeb80
#include <migraphx/eliminate_allocation.hpp>
#include <migraphx/dead_code_elimination.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/check_shapes.hpp>
#include <migraphx/argument.hpp>
#include <basic_ops.hpp>
#include <test.hpp>
...
...
test/eliminate_concat_test.cpp
View file @
5b2aeb80
#include <migraphx/eliminate_concat.hpp>
#include <migraphx/dead_code_elimination.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/op/concat.hpp>
#include <migraphx/op/load.hpp>
#include <migraphx/op/identity.hpp>
#include <basic_ops.hpp>
#include <test.hpp>
...
...
test/eliminate_contiguous_test.cpp
View file @
5b2aeb80
#include <migraphx/eliminate_contiguous.hpp>
#include <migraphx/dead_code_elimination.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/op/transpose.hpp>
#include <migraphx/op/contiguous.hpp>
#include <basic_ops.hpp>
#include <test.hpp>
...
...
Prev
1
2
3
4
5
6
Next
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