Commit 15eba3f4 authored by Brian Pickrell's avatar Brian Pickrell
Browse files

update an Onnx test. Original version used optimize_onnx(), which isn't...

update an Onnx test.  Original version used optimize_onnx(), which isn't compatible with dynamic shapes
parents 1504d5d5 83875c33
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
##################################################################################### #####################################################################################
# This script generates onnx files for MIGraphX onnx operator tests. # This script generates onnx files for MIGraphX onnx operator tests.
# To generate an individual onnx file, you can use the following # 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 numpy as np
import onnx import onnx
from onnx import helper from onnx import helper
...@@ -4622,6 +4622,19 @@ def reducel1_test(): ...@@ -4622,6 +4622,19 @@ def reducel1_test():
return ([node], [x], [y]) 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])
axes = [-2]
node = onnx.helper.make_node('ReduceL1_dyn',
inputs=['x'],
outputs=['y'],
axes=axes,
keepdims=0)
return ([node], [x], [y])
@onnx_test @onnx_test
def reducel2_test(): def reducel2_test():
......
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