jiazhihao / TASO

The Tensor Algebra SuperOptimizer for Deep Learning
Apache License 2.0
682 stars 89 forks source link

Fix ONNX input naming #97

Open markuswt opened 1 year ago

markuswt commented 1 year ago

Currently, all input tensors in generated ONNX models are labeled "data". Since ONNX supports multiple inputs, this creates conflicts. For example, the following graph would be exported as having two separate inputs:

g = taso.new_graph()
i = g.new_input(dims=(5, 5, 10, 10))
g.add(i, i)

This PR fixes this issue by giving all inputs a unique name.