Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bugfix][ONNX] Skip constant If node generated by PyTorch (apache#17383)
* [Bugfix][VTA] Fix FSIM compile error on macOS. VTA FSIM could not be built on macOS, for it leverages malloc.h and memalign, yet both have been deprecated and are not provided by macOS. This issue was captured in apache#13173. This commit stops including malloc.h in VTA Runtime as stdlib.h has provided functions we need. This commit uses posix_memalign instead of memalign. It is a portable standard function. * Fix format. * [Bugfix][ONNX] Skip constant If node generated by PyTorch This commit adds a check for If nodes for ONNX frontend of Relay to skip the broadcast if the predicate is constant. Sometimes PyTorch to ONNX inserts silly if nodes that produce dynamic ranks, and ONNX frontend of TVM would broadcast the lower dimensions between branches, which is irrational for some cases, e.g. 5×5×3×4 to 5×5×3×4×1. The predicate of silly if might be constant and reasonable to skip to avoid the broadcast problem. This issue was captured in apache#16898. * Fix format.
- Loading branch information