Commit 696b449a authored by Shucai Xiao's avatar Shucai Xiao
Browse files

Add onnx test for sin,cos,tan operators.

parent 35bbdce5
 cos-example:9
xy"Costest_cosZ
x


b
y


B
\ No newline at end of file
......@@ -169,6 +169,39 @@ void dropout_test()
EXPECT(p == prog);
}
void sin_test()
{
migraphx::program p;
auto input = p.add_parameter("x", migraphx::shape{migraphx::shape::float_type, {10}});
p.add_instruction(migraphx::op::sin{}, input);
auto prog = migraphx::parse_onnx("sin_test.onnx");
EXPECT(p == prog);
}
void cos_test()
{
migraphx::program p;
auto input = p.add_parameter("x", migraphx::shape{migraphx::shape::float_type, {10}});
p.add_instruction(migraphx::op::cos{}, input);
auto prog = migraphx::parse_onnx("cos_test.onnx");
EXPECT(p == prog);
}
void tan_test()
{
migraphx::program p;
auto input = p.add_parameter("x", migraphx::shape{migraphx::shape::float_type, {10}});
p.add_instruction(migraphx::op::tan{}, input);
auto prog = migraphx::parse_onnx("tan_test.onnx");
EXPECT(p == prog);
}
int main()
{
pytorch_conv_bias_test();
......@@ -181,4 +214,7 @@ int main()
globalmaxpool_test();
transpose_test();
dropout_test();
sin_test();
cos_test();
tan_test();
}
 sin-example:9
xy"Sintest_sinZ
x


b
y


B
\ No newline at end of file
 tan-example:9
xy"Tantest_tanZ
x


b
y


B
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment