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

[DOCS] TVM install addenda for M1 Macs #8568

Merged
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/install/from_source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ linux operating systems, execute (in a terminal):
sudo apt-get update
sudo apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev build-essential cmake libedit-dev libxml2-dev

On macOS, whether using an Intel or M1 Mac we can use homebrew. Make sure to follow the post installation steps for each of the below commaands.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "M1 Mac, "

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would go so far as to say "only Homebrew installations have been tested."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Furthermore, avoid using python 3.9.X+ which is not supported at the time of this writing. With this, you should have the ability to compile a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a link to a bug stating the problem?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking this issue up online, it seems like support was added earlier this year, so information is conflicting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh there definitely are still issues however since 3.9 changed the python IR which TVM apparently manipulates in some parts.

Copy link
Contributor

@hogepodge hogepodge Jul 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, if it's a general problem, we should state that as part of the overall requirements. I don't mind having that be part of this patch, and if there is more information we need to file an issue against TVM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I personally don't have enough background to make a good issue. But maybe others do @areusch @tkonolige

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#8577 <-- made a dummy issue to link against in the meantime. Made some changes to the wording to make it a general requirement

basic build of TVM with llvm included. Additional missing requirements can also be installed via brew if they arise:

.. code:: bash

brew install gcc git cmake
brew install llvm
brew install python@3.8


We use cmake to build the library.
The configuration of TVM can be modified by editing `config.cmake` and/or by passing cmake flags to the command line:
Expand Down Expand Up @@ -293,6 +303,17 @@ like ``virtualenv``.

pip3 install --user tornado psutil xgboost cloudpickle

Note on M1 macs, you may have trouble installing xgboost / scipy. A workaround for this is to do the following commands:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to explain why there might be an issue. For example, it looks like OPENBLAS needs to be installed and configured. Stating that helps future readers and contributors understand what the problem is, and possibly update the instructions if the issue is resolved. So, for example:

"scipy and xgboost requires some additional dependencies to be installed, including openblas and its dependencies. Use the following commands to install scipy and xgboost with the required dependencies and configuration."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


.. code:: bash

brew install openblas gfortran

pip install pybind11 cython pythran  

export OPENBLAS=/opt/homebrew/opt/openblas/lib/ && pip install scipy —no-use-pep517

pip install xgboost

Install Contrib Libraries
-------------------------
Expand Down