You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: examples/pt2/README.md
+6-3
Original file line number
Diff line number
Diff line change
@@ -56,14 +56,17 @@ torchserve takes care of 4 and 5 for you while the remaining steps are your resp
56
56
57
57
### Note
58
58
59
-
`torch.compile()` is a JIT compiler and JIT compilers generally have a startup cost. If that's an issue for you make sure to populate these two environment variables to improve your warm starts.
59
+
`torch.compile()` is a JIT compiler and JIT compilers generally have a startup cost. To reduce the warm up time, `TorchInductor` already makes use of caching in `/tmp/torchinductor_USERID` of your machine
60
+
61
+
To persist this cache and /or to make use of additional experimental caching feature, set the following
60
62
61
63
```
62
64
import os
63
65
64
-
os.environ["TORCHINDUCTOR_CACHE_DIR"] = "1"
65
-
os.environ["TORCHINDUCTOR_FX_GRAPH_CACHE"] = "/path/to/directory" # replace with your desired path
66
+
os.environ["TORCHINDUCTOR_CACHE_DIR"] = "/path/to/directory" # replace with your desired path
67
+
os.environ["TORCHINDUCTOR_FX_GRAPH_CACHE"] = "1"
66
68
```
69
+
An example of how to use these with TorchServe is shown [here](./torch_inductor_caching/)
0 commit comments