Skip to content

Commit 24ab7c2

Browse files
Add instructions on making VSCode discover the pytorch/xla repo. (#9134)
Co-authored-by: Zhanyong Wan <[email protected]>
1 parent b7bd6ce commit 24ab7c2

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,16 @@ commands on your Linux machine directly, outside of the container.
121121
[bazel remote build caching](https://github.com/pytorch/xla/blob/master/docs/source/contribute/bazel.md#remote-caching)
122122
for faster builds.
123123

124-
2. Open a new terminal window in VS Code. Since you are running as root in this
124+
1. Make sure VSCode discovers the `pytorch/xla` repo so that diff highlighting
125+
works (by default VSCode cannot discover it as it's nested inside the
126+
`pytorch` repo):
127+
128+
1. Go to File > Add Folder to Workspace..., and add the `pytorch/xla`
129+
folder.
130+
1. In the repository list, you should now see 3 repos: `xla` (for
131+
`pytorch/xla`), `pytorch`, and `vision`.
132+
133+
1. Open a new terminal window in VS Code. Since you are running as root in this
125134
container, mark the repository directories as safe. The commands below assume
126135
your workspace directory is `torch`, update the commands to use your workspace
127136
directory.
@@ -132,7 +141,7 @@ commands on your Linux machine directly, outside of the container.
132141
git config --global --add safe.directory /workspaces/torch/vision
133142
```
134143

135-
3. In the terminal window, run the following commands to build PyTorch,
144+
1. In the terminal window, run the following commands to build PyTorch,
136145
TorchVision, and PyTorch/XLA:
137146

138147
```bash
@@ -153,7 +162,7 @@ commands on your Linux machine directly, outside of the container.
153162
-f https://storage.googleapis.com/libtpu-releases/index.html
154163
```
155164

156-
4. If you are running on a TPU VM, ensure `torch` and `torch_xla` were built and
165+
1. If you are running on a TPU VM, ensure `torch` and `torch_xla` were built and
157166
installed correctly:
158167

159168
```bash

0 commit comments

Comments
 (0)