diff --git a/experimental/torch_xla2/README.md b/experimental/torch_xla2/README.md index adf3a4de83c..3b3cf5cc23c 100644 --- a/experimental/torch_xla2/README.md +++ b/experimental/torch_xla2/README.md @@ -35,7 +35,7 @@ source my_venv/bin/activate #### 1.1 Install torch CPU, even if your device has GPU or TPU: ```bash -pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu +pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu ``` Or, follow official instructions in [pytorch.org](https://pytorch.org/get-started/locally/) to install for your OS. diff --git a/experimental/torch_xla2/pyproject.toml b/experimental/torch_xla2/pyproject.toml index d24c7a32ede..d0d2a42dec8 100644 --- a/experimental/torch_xla2/pyproject.toml +++ b/experimental/torch_xla2/pyproject.toml @@ -23,8 +23,8 @@ dependencies = [ # "torch", ] -[tool.pytest.ini_options] -addopts="-n auto" - requires-python = ">=3.10" license = {file = "LICENSE"} + +[tool.pytest.ini_options] +addopts="-n auto" diff --git a/experimental/torch_xla2/torch_xla2/CONTRIBUTING.md b/experimental/torch_xla2/torch_xla2/CONTRIBUTING.md new file mode 100644 index 00000000000..ee640dac836 --- /dev/null +++ b/experimental/torch_xla2/torch_xla2/CONTRIBUTING.md @@ -0,0 +1,38 @@ +# Contributing to TorchXLA2 + +We appreciate all contributions. If you are planning to contribute a bug fix for an open issue, please comment on the thread and we're happy to provide any guidance. You are very welcome to pick issues from good first issue and help wanted labels. + +If you plan to contribute new features, utility functions or extensions to the core, please first open an issue and discuss the feature with us. Sending a PR without discussion might end up resulting in a rejected PR, because we might be taking the core in a different direction than you might be aware of. + + +# Developer setup + +## Mac setup: +@qihqi + +I am able to develop directly on mac (m1) laptop for most of parts. Using steps +in README.md works. The condensed version for easy copy & paste: + +```bash +conda create --name python=3.10 +conda activate +pip install --upgrade "jax[cpu]" torch +pip install -r test_requirements.txt +pip install -e . +pytest test +``` + +### VSCode + +I use vscode on my Mac. I loosely followed instruction in +https://code.visualstudio.com/docs/python/python-tutorial +to setup a proper python environment. + +The plugins I installed (a subset of the ones listed above) are: +* VSCode's official Python plugin +* Ruff formatter +* Python Debugger + +I also changed Python interpreter to point at the one in my conda env. +That is all the changes I have. +