Commit 83875c33 authored by Brian Pickrell's avatar Brian Pickrell
Browse files

add Onnx test file

parent b5a02fea
......@@ -23,7 +23,7 @@
#####################################################################################
# This script generates onnx files for MIGraphX onnx operator tests.
# To generate an individual onnx file, you can use the following
# command: python -c "import gen_onnx; gen_onnx.{test_name}_test()"
# command: python3 -c "import gen_onnx; gen_onnx.{test_name}_test()"
import numpy as np
import onnx
from onnx import helper
......@@ -44,7 +44,6 @@ def onnx_test(op_test):
op_info[1], op_info[2])
model_def = helper.make_model(graph_def,
producer_name=op_test.__name__)
print('hello', op_test.__name__)
onnx.save(model_def, '{}.onnx'.format(op_test.__name__))
return run_test
......@@ -4452,6 +4451,7 @@ def reducel1_test():
return ([node], [x], [y])
@onnx_test
def reducel1_dyn_test():
x = helper.make_tensor_value_info('x', TensorProto.FLOAT, [None])
y = helper.make_tensor_value_info('y', TensorProto.FLOAT, [None])
......
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