Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] VTA FSIM MacOS incompatibility #13173

Closed
gussmith23 opened this issue Oct 21, 2022 · 1 comment
Closed

[Bug] VTA FSIM MacOS incompatibility #13173

gussmith23 opened this issue Oct 21, 2022 · 1 comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug

Comments

@gussmith23
Copy link
Contributor

@vcanumalla is attempting to build FSIM on MacOS and running into issues:

  • FSIM source includes malloc.h, which isn't present (at least not by default) on MacOS. Removing the import doesn't break the code, so it doesn't seem necessary.
  • the memalign function is not present on MacOS. @vcanumalla was experimenting with replacing it with posix_memalign.

Are there instructions for building on MacOS specifically?

@gussmith23 gussmith23 added needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug labels Oct 21, 2022
xhmelon added a commit to xhmelon/tvm that referenced this issue Apr 18, 2023
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.
tqchen pushed a commit that referenced this issue Nov 6, 2023
* [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 #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.
@xhmelon
Copy link
Contributor

xhmelon commented Apr 11, 2024

Hi @vegaluisjose @vinx13 @masahi, please close this issue as it has been resolved.

@masahi masahi closed this as completed Apr 11, 2024
Hzfengsy pushed a commit that referenced this issue May 5, 2024
* [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 #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] Improve broadcast and batch_matmul conversion

This commit provides batch_matmul conversions between a 3D or above
matrix and a 1D matrix with proper broadcasting, which improves
the robustness of the ONNX frontend. This issue was captured in #16891.

* Fix format.
Hzfengsy pushed a commit that referenced this issue Sep 22, 2024
* [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 #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 #16898.

* Fix format.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug
Projects
None yet
Development

No branches or pull requests

3 participants