Skip to content

Commit

Permalink
Fixed torch and ONNX installation instructions (added missing find-l…
Browse files Browse the repository at this point in the history
…inks option) (quic#3397)

* Added missing find-links URL topion to torch installation instructions
* Fixed onnx wheel instructions, added common pre-requisites
* Fixed onnx-cpu wheel install instructions
* Added pip version pinning

Signed-off-by: Bharath Ramaswamy <[email protected]>
  • Loading branch information
quic-bharathr authored Oct 15, 2024
1 parent 14812ea commit f77040b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 14 deletions.
35 changes: 25 additions & 10 deletions Docs/install/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,43 @@ The AIMET PyTorch GPU PyPI packages are available for environments that meet the

**Pip install**

.. code-block::
.. code-block:: bash
apt-get install liblapacke
apt-get install liblapacke libpython3-dev
python3 -m pip install aimet-torch
Release Packages
~~~~~~~~~~~~~~~~

For other AIMET variants, install the *latest* version from the .whl files hosted at https://github.com/quic/aimet/releases
For other AIMET variants, install the *latest* version from the .whl files hosted at https://github.com/quic/aimet/releases (compatible with python 3.10 only at this time).

**Prerequisite**

The following pre-requisites apply to all variants. The GPU variants may need additional packages - please see `Advanced Installation Instructions`_ for details.


.. code-block:: bash
# Install pre-requisite packages
apt-get install liblapacke libpython3-dev
# Install an compatible version of pip (since the latest version is NOT compatible with our wheel packages)
python3 -m pip install pip==24.0
**PyTorch**

.. parsed-literal::
# Pytorch 2.1 with CUDA 12.x
python3 -m pip install |download_url|\ |version|/aimet_torch-\ |version|.cu121\ |whl_suffix|
python3 -m pip install |download_url|\ |version|/aimet_torch-\ |version|.cu121\ |whl_suffix| -f |torch_pkg_url|
# Pytorch 2.1 CPU only
python3 -m pip install |download_url|\ |version|/aimet_torch-\ |version|.cpu\ |whl_suffix|
python3 -m pip install |download_url|\ |version|/aimet_torch-\ |version|.cpu\ |whl_suffix| -f |torch_pkg_url|
# Pytorch 1.13 with CUDA 11.x
python3 -m pip install |download_url|\ |version|/aimet_torch-\ |version|.cu117\ |whl_suffix|
python3 -m pip install |download_url|\ |version|/aimet_torch-\ |version|.cu117\ |whl_suffix| -f |torch_pkg_url|
**TensorFlow**
Expand All @@ -88,21 +102,22 @@ For other AIMET variants, install the *latest* version from the .whl files hoste
python3 -m pip install |download_url|\ |version|/aimet_tensorflow-\ |version|.cpu\ |whl_suffix|
**Onnx**
**ONNX**

.. parsed-literal::
# ONNX 1.16 GPU with CUDA 11.x
python3 -m pip install |download_url|\ |version|/aimet_onnx-\ |version|.cu117\ |whl_suffix|
python3 -m pip install |download_url|\ |version|/aimet_onnx-\ |version|.cu117\ |whl_suffix| -f |torch_pkg_url|
# ONNX 1.16 CPU
python3 -m pip install |download_url|\ |version|/aimet_onnx-\ |version|.cpu\ |whl_suffix|
python3 -m pip install |download_url|\ |version|/aimet_onnx-\ |version|.cpu\ |whl_suffix| -f |torch_pkg_url|
For older versions, please browse the releases at https://github.com/quic/aimet/releases and follow the documentation corresponding to that release to select and install the appropriate package.

.. |whl_suffix| replace:: -cp310-cp310-manylinux_2_34_x86_64.whl
.. |download_url| replace:: \https://github.com/quic/aimet/releases/download/
.. |torch_pkg_url| replace:: \https://download.pytorch.org/whl/torch_stable.html

System Requirements
~~~~~~~~~~~~~~~~~~~
Expand Down
10 changes: 8 additions & 2 deletions Docs/install/install_docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,20 @@ Set the package details as follows:
# ex. "aimet_torch-1.34.0.cu121-cp310-cp310-manylinux_2_34_x86_64.whl"
export wheel_file_name="<wheel file name>"
# NOTE: Do the following ONLY for the PyTorch and ONNX variant packages!
export find_pkg_url_str="-f https://download.pytorch.org/whl/torch_stable.html"
Install the selected AIMET package as specified below:

**NOTE:** Python dependencies will automatically get installed.

.. code-block:: bash
python3 -m pip install ${download_url}/${wheel_file_name}
# Install an compatible version of pip (since the latest version is NOT compatible with our wheel packages)
python3 -m pip install pip==24.0
# Install the wheel package
python3 -m pip install ${download_url}/${wheel_file_name} ${find_pkg_url_str}
Environment setup
~~~~~~~~~~~~~~~~~
Expand All @@ -173,4 +180,3 @@ Set the common environment variables as follows:
.. code-block:: bash
source /usr/local/lib/python3.10/dist-packages/aimet_common/bin/envsetup.sh
11 changes: 9 additions & 2 deletions Docs/install/install_host.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,20 @@ Set the package details as follows:
# ex. "aimet_torch-1.33.0.cu121-cp310-cp310-manylinux_2_34_x86_64.whl"
export wheel_file_name="<wheel file name>"
# NOTE: Do the following ONLY for the PyTorch and ONNX variant packages!
export find_pkg_url_str="-f https://download.pytorch.org/whl/torch_stable.html"
Install the selected AIMET package as specified below:

**NOTE:** Python dependencies will automatically get installed.

.. code-block:: bash
python3 -m pip install ${download_url}/${wheel_file_name}
# Install an compatible version of pip (since the latest version is NOT compatible with our wheel packages)
python3 -m pip install pip==24.0
# Install the wheel package
python3 -m pip install ${download_url}/${wheel_file_name} ${find_pkg_url_str}
Install common debian packages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -237,4 +245,3 @@ Set the common environment variables as follows:
.. code-block:: bash
source /usr/local/lib/python3.10/dist-packages/aimet_common/bin/envsetup.sh

0 comments on commit f77040b

Please sign in to comment.