Skip to content

Commit

Permalink
[doc][minor] pytorch 1.12 + conda (facebookresearch#346)
Browse files Browse the repository at this point in the history
* pytorch 1.12 + conda
* bumping up triton + matplotlib upgrade fix
* typo
  • Loading branch information
blefaudeux authored Jul 3, 2022
1 parent 6c003f1 commit a59281a
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 8 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@ For recent changes, you can have a look at the [changelog](CHANGELOG.md)

### Installation

To install xFormers, it is recommended to use a dedicated virtual environment, as often with python, through `python-virtualenv` or `conda` for instance.
To install xFormers, it is recommended to use a dedicated virtual environment, as often with python, through `python-virtualenv` or `conda` for instance. A preset conda environment is provided for convenience, you can use it as follows:

```bash
conda create --name xformer_env
conda activate xformer_env
conda env create --file=environment_conda.yaml
conda activate xformers
```

*Please note that, until Pytorch 1.12 is released, xformers requires Pytorch nightly to be installed. You can fetch it using `pip` or `conda` [here](https://pytorch.org/get-started/locally/)*

*Please note that Pytorch 1.12 or newer is required. You can fetch it using `pip` or `conda` [here](https://pytorch.org/get-started/locally/)*

There are two ways you can install xFormers locally:

Expand Down
77 changes: 77 additions & 0 deletions environment_conda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: xformers
channels:
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=2_gnu
- binutils_impl_linux-64=2.36.1=h193b22a_2
- bzip2=1.0.8=h7f98852_4
- ca-certificates=2022.6.15=ha878542_0
- cudatoolkit=11.3.1=h9edb442_10
- cudatoolkit-dev=11.3.1=py38h497a2fe_0
- gcc=9.4.0=h192d537_10
- gcc_impl_linux-64=9.4.0=h03d3576_16
- gxx=9.4.0=h192d537_10
- gxx_impl_linux-64=9.4.0=h03d3576_16
- kernel-headers_linux-64=2.6.32=he073ed8_15
- ld_impl_linux-64=2.36.1=hea4e1c9_2
- libffi=3.4.2=h7f98852_5
- libgcc-devel_linux-64=9.4.0=hd854feb_16
- libgcc-ng=12.1.0=h8d9b700_16
- libgomp=12.1.0=h8d9b700_16
- libnsl=2.0.0=h7f98852_0
- libsanitizer=9.4.0=h79bfe98_16
- libstdcxx-devel_linux-64=9.4.0=hd854feb_16
- libstdcxx-ng=12.1.0=ha89aaad_16
- libuuid=2.32.1=h7f98852_1000
- libzlib=1.2.12=h166bdaf_1
- ncurses=6.3=h27087fc_1
- openssl=3.0.4=h166bdaf_2
- pip=22.1.2=pyhd8ed1ab_0
- python=3.8.13=ha86cf86_0_cpython
- python_abi=3.8=2_cp38
- readline=8.1.2=h0f457ee_0
- setuptools=62.6.0=py38h578d9bd_0
- sqlite=3.39.0=h4ff8645_0
- sysroot_linux-64=2.12=he073ed8_15
- tk=8.6.12=h27826a3_0
- wheel=0.37.1=pyhd8ed1ab_0
- xz=5.2.5=h516909a_1
- zlib=1.2.12=h166bdaf_1
- pip:
- black==22.6.0
- certifi==2022.6.15
- cfgv==3.3.1
- charset-normalizer==2.1.0
- click==8.1.3
- distlib==0.3.4
- filelock==3.7.1
- flake8==4.0.1
- identify==2.5.1
- idna==3.3
- mccabe==0.6.1
- mypy==0.961
- mypy-extensions==0.4.3
- nodeenv==1.7.0
- numpy==1.23.0
- pathspec==0.9.0
- pillow==9.2.0
- platformdirs==2.5.2
- pre-commit==2.19.0
- pycodestyle==2.8.0
- pyflakes==2.4.0
- pyre-extensions==0.0.23
- pyyaml==6.0
- requests==2.28.1
- six==1.16.0
- toml==0.10.2
- tomli==2.0.1
- torch==1.12.0+cu113
- torchaudio==0.12.0+cu113
- torchvision==0.13.0+cu113
- typing-extensions==4.3.0
- typing-inspect==0.7.1
- urllib3==1.26.9
- virtualenv==20.15.1
prefix: /home/lefaudeux/.conda/envs/xformers
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ hydra-core >= 1.1
fairscale >= 0.4.5

# Dependency for fused layers, optional
triton == 2.0.0.dev20220403
triton == 2.0.0.dev20220701
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Example requirement, can be anything that pip knows
# install with `pip install -r requirements.txt`, and make sure that CI does the same
torch >= 1.8.1
torch >= 1.12
numpy
pyre-extensions == 0.0.23
2 changes: 1 addition & 1 deletion xformers/benchmarks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def pretty_print(results, title, units):


def pretty_plot(
results, title, units: str, filename=None, dash_key="", legend_loc="bottom_right"
results, title, units: str, filename=None, dash_key="", legend_loc="lower right"
):
"""Graph out the contents of a dict.
Dash key means that if the result label has this key, then it will be displayed with a dash"""
Expand Down

0 comments on commit a59281a

Please sign in to comment.