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
70f793b4
Commit
70f793b4
authored
Apr 24, 2019
by
Shucai Xiao
Browse files
clang format
parent
7eef6cfc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
test/cpu_ops_test.cpp
test/cpu_ops_test.cpp
+2
-2
test/gpu/miopen.cpp
test/gpu/miopen.cpp
+4
-4
test/type_conversion.cpp
test/type_conversion.cpp
+3
-3
No files found.
test/cpu_ops_test.cpp
View file @
70f793b4
...
@@ -1573,7 +1573,7 @@ TEST_CASE(fp32_fp16_test)
...
@@ -1573,7 +1573,7 @@ TEST_CASE(fp32_fp16_test)
{
{
std
::
vector
<
float
>
gold_res
=
{
2.0
,
4.0
,
6.0
,
8.0
,
10.0
,
12.0
};
std
::
vector
<
float
>
gold_res
=
{
2.0
,
4.0
,
6.0
,
8.0
,
10.0
,
12.0
};
auto
p
=
create_program
();
auto
p
=
create_program
();
migraphx
::
quantize
(
p
,
{
"all"
});
migraphx
::
quantize
(
p
,
{
"all"
});
p
.
compile
(
migraphx
::
cpu
::
target
{});
p
.
compile
(
migraphx
::
cpu
::
target
{});
auto
result
=
p
.
eval
({});
auto
result
=
p
.
eval
({});
...
@@ -1584,7 +1584,7 @@ TEST_CASE(fp32_fp16_test)
...
@@ -1584,7 +1584,7 @@ TEST_CASE(fp32_fp16_test)
{
{
std
::
vector
<
float
>
gold_res
=
{
2.0
,
4.0
,
6.0
,
8.0
,
10.0
,
12.0
};
std
::
vector
<
float
>
gold_res
=
{
2.0
,
4.0
,
6.0
,
8.0
,
10.0
,
12.0
};
auto
p
=
create_program
();
auto
p
=
create_program
();
migraphx
::
quantize
(
p
,
{
"all"
});
migraphx
::
quantize
(
p
,
{
"all"
});
p
.
compile
(
migraphx
::
cpu
::
target
{});
p
.
compile
(
migraphx
::
cpu
::
target
{});
auto
result
=
p
.
eval
({});
auto
result
=
p
.
eval
({});
...
...
test/gpu/miopen.cpp
View file @
70f793b4
...
@@ -3337,7 +3337,7 @@ template struct test_logsoftmax_1<1>;
...
@@ -3337,7 +3337,7 @@ template struct test_logsoftmax_1<1>;
struct
test_fp32_fp16_lall
:
verify_program
<
test_fp32_fp16_lall
>
struct
test_fp32_fp16_lall
:
verify_program
<
test_fp32_fp16_lall
>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
2
,
3
}};
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
2
,
3
}};
...
@@ -3353,7 +3353,7 @@ struct test_fp32_fp16_lall : verify_program<test_fp32_fp16_lall>
...
@@ -3353,7 +3353,7 @@ struct test_fp32_fp16_lall : verify_program<test_fp32_fp16_lall>
struct
test_fp32_fp16_ladd
:
verify_program
<
test_fp32_fp16_ladd
>
struct
test_fp32_fp16_ladd
:
verify_program
<
test_fp32_fp16_ladd
>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
2
,
3
}};
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
2
,
3
}};
...
@@ -3369,7 +3369,7 @@ struct test_fp32_fp16_ladd : verify_program<test_fp32_fp16_ladd>
...
@@ -3369,7 +3369,7 @@ struct test_fp32_fp16_ladd : verify_program<test_fp32_fp16_ladd>
struct
test_fp32_fp16_add
:
verify_program
<
test_fp32_fp16_add
>
struct
test_fp32_fp16_add
:
verify_program
<
test_fp32_fp16_add
>
{
{
migraphx
::
program
create_program
()
migraphx
::
program
create_program
()
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
2
,
3
}};
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
2
,
3
}};
...
@@ -3386,7 +3386,7 @@ struct test_fp32_fp16_add : verify_program<test_fp32_fp16_add>
...
@@ -3386,7 +3386,7 @@ struct test_fp32_fp16_add : verify_program<test_fp32_fp16_add>
struct
test_fp32_fp16_sub
:
verify_program
<
test_fp32_fp16_sub
>
struct
test_fp32_fp16_sub
:
verify_program
<
test_fp32_fp16_sub
>
{
{
migraphx
::
program
create_program
()
migraphx
::
program
create_program
()
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
2
,
3
}};
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
2
,
3
}};
...
...
test/type_conversion.cpp
View file @
70f793b4
...
@@ -115,9 +115,9 @@ TEST_CASE(param_add_sub)
...
@@ -115,9 +115,9 @@ TEST_CASE(param_add_sub)
auto
p2
=
p
.
add_parameter
(
"y"
,
s
);
auto
p2
=
p
.
add_parameter
(
"y"
,
s
);
auto
hp2
=
p
.
insert_instruction
(
auto
hp2
=
p
.
insert_instruction
(
std
::
next
(
p2
),
migraphx
::
op
::
convert
{
migraphx
::
shape
::
half_type
},
p2
);
std
::
next
(
p2
),
migraphx
::
op
::
convert
{
migraphx
::
shape
::
half_type
},
p2
);
auto
hsum
=
p
.
add_instruction
(
migraphx
::
op
::
add
{},
hp1
,
hp2
);
auto
hsum
=
p
.
add_instruction
(
migraphx
::
op
::
add
{},
hp1
,
hp2
);
auto
hdiff
=
p
.
add_instruction
(
migraphx
::
op
::
sub
{},
hsum
,
hp2
);
auto
hdiff
=
p
.
add_instruction
(
migraphx
::
op
::
sub
{},
hsum
,
hp2
);
auto
hres
=
p
.
add_instruction
(
migraphx
::
op
::
add
{},
hdiff
,
hp1
);
auto
hres
=
p
.
add_instruction
(
migraphx
::
op
::
add
{},
hdiff
,
hp1
);
p
.
add_instruction
(
migraphx
::
op
::
convert
{
migraphx
::
shape
::
float_type
},
hres
);
p
.
add_instruction
(
migraphx
::
op
::
convert
{
migraphx
::
shape
::
float_type
},
hres
);
return
p
;
return
p
;
...
@@ -145,7 +145,7 @@ TEST_CASE(param_add_sub)
...
@@ -145,7 +145,7 @@ TEST_CASE(param_add_sub)
migraphx
::
quantize
(
p1
,
{
"all"
});
migraphx
::
quantize
(
p1
,
{
"all"
});
migraphx
::
run_passes
(
p1
,
{
migraphx
::
dead_code_elimination
{}});
migraphx
::
run_passes
(
p1
,
{
migraphx
::
dead_code_elimination
{}});
EXPECT
(
p1
==
p2
);
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