onnxruntime
55c3f4b2 - Fix CoreML Flatten handling of axis attribute (#16046)

Commit
2 years ago
Fix CoreML Flatten handling of axis attribute (#16046) ### Description <!-- Describe your changes. --> The CoreML EP implementation was not reading the axis attribute correctly causing an incorrect output shape to be produced for a Flatten node. That issue gets hidden as the Tensor to write the output to is created by the CoreML EP using the inferred output shape (which is correct) and we provide the Tensor's buffer but not the shape when executing the CoreML model. As the flatten isn't changing or moving any data nothing breaks when we test with only a Flatten node in the model. Fix the attribute name and add a test that uses a model with a Flatten followed by a Mul which requires broadcasting. Both nodes are handled by CoreML, so if the axis is not correctly processed the output from Flatten will not be broadcastable and the CoreML model execution will fail. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Bug fix.
Author
Parents
Loading