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
77cc8d16
Commit
77cc8d16
authored
May 07, 2019
by
Shucai Xiao
Browse files
add gpu test for quant_dot
parent
2e6d1431
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
test/gpu/miopen.cpp
test/gpu/miopen.cpp
+72
-0
No files found.
test/gpu/miopen.cpp
View file @
77cc8d16
...
...
@@ -1237,6 +1237,78 @@ struct gemm_multi_3args_alpha0 : verify_program<gemm_multi_3args_alpha0>
}
};
struct
quant_dot_3args_1
:
verify_program
<
quant_dot_3args_1
>
{
migraphx
::
program
create_program
()
const
{
migraphx
::
program
p
;
migraphx
::
shape
m1_shape
{
migraphx
::
shape
::
int8_type
,
{
2
,
8
}};
migraphx
::
shape
m2_shape
{
migraphx
::
shape
::
int8_type
,
{
8
,
7
}};
migraphx
::
shape
m3_shape
{
migraphx
::
shape
::
int32_type
,
{
2
,
7
}};
auto
l1
=
p
.
add_parameter
(
"a"
,
m1_shape
);
auto
l2
=
p
.
add_parameter
(
"b"
,
m2_shape
);
auto
l3
=
p
.
add_parameter
(
"c"
,
m3_shape
);
p
.
add_instruction
(
migraphx
::
op
::
quant_dot
{},
l1
,
l2
,
l3
);
return
p
;
}
};
struct
quant_dot_3args_2
:
verify_program
<
quant_dot_3args_2
>
{
migraphx
::
program
create_program
()
const
{
migraphx
::
program
p
;
migraphx
::
shape
m1_shape
{
migraphx
::
shape
::
int8_type
,
{
8
,
2
}};
migraphx
::
shape
m2_shape
{
migraphx
::
shape
::
int8_type
,
{
8
,
7
}};
migraphx
::
shape
m3_shape
{
migraphx
::
shape
::
int32_type
,
{
2
,
7
}};
auto
l1
=
p
.
add_parameter
(
"a"
,
m1_shape
);
auto
tl1
=
p
.
add_instruction
(
migraphx
::
op
::
transpose
{{
1
,
0
}},
l1
);
auto
l2
=
p
.
add_parameter
(
"b"
,
m2_shape
);
auto
l3
=
p
.
add_parameter
(
"c"
,
m3_shape
);
p
.
add_instruction
(
migraphx
::
op
::
quant_dot
{
1
,
3
},
tl1
,
l2
,
l3
);
return
p
;
}
};
struct
quant_dot_3args_3
:
verify_program
<
quant_dot_3args_3
>
{
migraphx
::
program
create_program
()
const
{
migraphx
::
program
p
;
migraphx
::
shape
m1_shape
{
migraphx
::
shape
::
int8_type
,
{
2
,
8
}};
migraphx
::
shape
m2_shape
{
migraphx
::
shape
::
int8_type
,
{
7
,
8
}};
migraphx
::
shape
m3_shape
{
migraphx
::
shape
::
int32_type
,
{
2
,
7
}};
auto
l1
=
p
.
add_parameter
(
"a"
,
m1_shape
);
auto
l2
=
p
.
add_parameter
(
"b"
,
m2_shape
);
auto
tl2
=
p
.
add_instruction
(
migraphx
::
op
::
transpose
{{
1
,
0
}},
l2
);
auto
l3
=
p
.
add_parameter
(
"c"
,
m3_shape
);
p
.
add_instruction
(
migraphx
::
op
::
quant_dot
{
2
,
3
},
l1
,
tl2
,
l3
);
return
p
;
}
};
struct
quant_dot_3args_4
:
verify_program
<
quant_dot_3args_4
>
{
migraphx
::
program
create_program
()
const
{
migraphx
::
program
p
;
migraphx
::
shape
m1_shape
{
migraphx
::
shape
::
int8_type
,
{
8
,
2
}};
migraphx
::
shape
m2_shape
{
migraphx
::
shape
::
int8_type
,
{
7
,
8
}};
migraphx
::
shape
m3_shape
{
migraphx
::
shape
::
int32_type
,
{
2
,
7
}};
auto
l1
=
p
.
add_parameter
(
"a"
,
m1_shape
);
auto
tl1
=
p
.
add_instruction
(
migraphx
::
op
::
transpose
{{
1
,
0
}},
l1
);
auto
l2
=
p
.
add_parameter
(
"b"
,
m2_shape
);
auto
tl2
=
p
.
add_instruction
(
migraphx
::
op
::
transpose
{{
1
,
0
}},
l2
);
auto
l3
=
p
.
add_parameter
(
"c"
,
m3_shape
);
p
.
add_instruction
(
migraphx
::
op
::
quant_dot
{
3
,
2
},
tl1
,
tl2
,
l3
);
return
p
;
}
};
struct
test_contiguous
:
verify_program
<
test_contiguous
>
{
migraphx
::
program
create_program
()
const
...
...
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