Skip to content

Commit

Permalink
[docs] Expand on instructions for installing torch for CPU. (#19493)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottTodd authored Dec 16, 2024
1 parent 8e86bcf commit f2690e2
Showing 1 changed file with 42 additions and 23 deletions.
65 changes: 42 additions & 23 deletions docs/website/docs/guides/ml-frameworks/pytorch.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,37 +62,56 @@ graph LR

## :octicons-download-16: Prerequisites

We recommend first installing a recent version of PyTorch for CPU by following
the [official instructions](https://pytorch.org/get-started/locally/).
1. First install a recent version of PyTorch by following
the [official instructions](https://pytorch.org/get-started/locally/):

``` shell
python -m pip install \
--index-url https://download.pytorch.org/whl/test/cpu torch>=2.3.0
```
=== ":fontawesome-brands-linux: Linux"

Install iree-turbine:
``` shell
python -m pip install torch --index-url https://download.pytorch.org/whl/test/cpu
```

=== ":octicons-package-16: Stable releases"
=== ":fontawesome-brands-apple: macOS"

Stable release packages are
[published to PyPI](https://pypi.org/project/iree-turbine/).
``` shell
python -m pip install torch
```

``` shell
python -m pip install iree-turbine
```
=== ":fontawesome-brands-windows: Windows"

=== ":octicons-beaker-16: Nightly pre-releases"
``` shell
python -m pip install torch
```

Nightly pre-releases are published on
[GitHub releases](https://github.com/iree-org/iree-turbine/releases/tag/dev-wheels).
!!! tip

``` shell hl_lines="2-4"
python -m pip install \
--find-links https://iree.dev/pip-release-links.html \
--pre \
--upgrade \
iree-turbine
```
IREE includes its own GPU support, so we recommend the CPU versions of
PyTorch. You can install CUDA or ROCm as you wish, but those packages
can be quite large.

2. Then install iree-turbine:

=== ":octicons-package-16: Stable releases"

Stable release packages are
[published to PyPI](https://pypi.org/project/iree-turbine/).

``` shell
python -m pip install iree-turbine
```

=== ":octicons-beaker-16: Nightly pre-releases"

Nightly pre-releases are published on
[GitHub releases](https://github.com/iree-org/iree-turbine/releases/tag/dev-wheels).

``` shell hl_lines="2-4"
python -m pip install \
--find-links https://iree.dev/pip-release-links.html \
--pre \
--upgrade \
iree-turbine
```

## :octicons-flame-16: Just-in-time (JIT) execution

Expand Down

0 comments on commit f2690e2

Please sign in to comment.