-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* migrate to pack package manager * update Idris version to latest
- Loading branch information
1 parent
8d3ed2d
commit d556915
Showing
16 changed files
with
132 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,50 @@ | ||
# Installation | ||
|
||
**Note:** these instructions may have changed since the latest release. Navigate to the instructions at the latest git tag for accurate details. | ||
|
||
## Install the Idris frontend | ||
|
||
1. Clone or download the spidr source code at tag v0.0.4 with, for example, | ||
```bash | ||
git clone --depth 1 --branch v0.0.4 https://github.com/joelberkeley/spidr.git | ||
1. Install the Idris2 package manager [pack](https://github.com/stefan-hoeck/idris2-pack). | ||
2. Install spidr with | ||
``` | ||
See the git history for installing earlier versions. | ||
2. [Install Idris 2](https://github.com/idris-lang/Idris2/blob/main/INSTALL.md). We recommend using [Homebrew](https://brew.sh/) if you're unsure which option to use. | ||
3. Install spidr's Idris dependencies by running `./install_deps.sh` located in the spidr root directory. | ||
4. In the spidr root directory, install spidr with | ||
```bash | ||
idris2 --install spidr.ipkg | ||
pack install spidr | ||
``` | ||
5. When building your Idris code that depends on spidr, either include `-p spidr` on the command line, or list spidr as a dependency in your project's configuration. In both cases, you will need to include spidr's dependencies with `-p hashable` on the command line or add `hashable` to your project's .ipkg `depends`. | ||
|
||
## Install the XLA backend | ||
|
||
6. Download the XLA C interface from the [releases page](https://github.com/joelberkeley/spidr/releases), and extract the archive. The extracted directory can be placed anywhere you wish. | ||
7. Download an XLA binary from [elixir-nx/xla](https://github.com/elixir-nx/xla/releases), and extract the archive. See the spidr releases page for details of which versions are supported. Place the directory `xla_extension` into the same path as the directory `c_xla_extension` extracted in step 6. | ||
8. When running code that depends on spidr, you may need to set `LD_LIBRARY_PATH` to include the location of the libc_xla_extension.so shared library located in `c_xla_extension` extracted in step 6. | ||
### CPU only | ||
|
||
## Additional steps for execution on GPU | ||
If you intend to run spidr on GPU, skip to the [GPU instructions](#gpu) | ||
|
||
**Note:** We have only tested this on a machine with a single GPU. | ||
3. Install XLA | ||
```bash | ||
wget https://github.com/elixir-nx/xla/releases/download/v0.3.0/xla_extension-x86_64-linux-cpu.tar.gz -qO- | sudo tar -C /usr/local/lib -xvz ./xla_extension/lib/libxla_extension.so | ||
``` | ||
```bash | ||
sudo bash -c 'echo "/usr/local/lib/xla_extension/lib" >> /etc/ld.so.conf.d/xla_extension.conf' && sudo ldconfig | ||
``` | ||
4. Install the C interface to XLA | ||
```bash | ||
wget https://github.com/joelberkeley/spidr/releases/download/v0.0.5/c_xla_extension-x86_64-linux-cpu.tar.gz -qO- | sudo tar -C /usr/local/lib -xvz ./c_xla_extension/lib/libc_xla_extension.so | ||
``` | ||
```bash | ||
sudo bash -c 'echo "/usr/local/lib/c_xla_extension/lib" >> /etc/ld.so.conf.d/c_xla_extension.conf' && sudo ldconfig | ||
``` | ||
|
||
9. Install the NVIDIA prerequisites for running TensorFlow on GPU, as listed on the TensorFlow GPU [installation page](https://www.tensorflow.org/install/gpu). **There is no need to install TensorFlow itself**. | ||
### GPU | ||
|
||
If you do *not* intend to run spidr on GPU, skip this section. | ||
|
||
3. Install the NVIDIA prerequisites for running TensorFlow on GPU, as listed on the TensorFlow GPU [installation page](https://www.tensorflow.org/install/gpu). **There is no need to install TensorFlow itself**. | ||
4. Install XLA | ||
```bash | ||
wget https://github.com/elixir-nx/xla/releases/download/v0.3.0/xla_extension-x86_64-linux-cuda111.tar.gz -qO- | sudo tar -C /usr/local/lib -xvz ./xla_extension/lib/libxla_extension.so | ||
``` | ||
```bash | ||
sudo bash -c 'echo "/usr/local/lib/xla_extension/lib" >> /etc/ld.so.conf.d/xla_extension.conf' && sudo ldconfig | ||
``` | ||
5. Install the C interface to XLA | ||
```bash | ||
wget https://github.com/joelberkeley/spidr/releases/download/v0.0.5/c_xla_extension-x86_64-linux-cuda111.tar.gz -qO- | sudo tar -C /usr/local/lib -xvz ./c_xla_extension/lib/libc_xla_extension.so | ||
``` | ||
```bash | ||
sudo bash -c 'echo "/usr/local/lib/c_xla_extension/lib" >> /etc/ld.so.conf.d/c_xla_extension.conf' && sudo ldconfig | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[custom.all.spidr] | ||
type = "local" | ||
path = "" | ||
ipkg = "spidr.ipkg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package spidr | ||
version = 0.0.4 | ||
version = 0.0.5 | ||
|
||
depends = contrib, hashable | ||
opts = "--total" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.