File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed
Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ It is a repo that contains scripts that makes using PyTorch on Windows easier.
2+
3+ # Comiling Examples
4+ You can download it in the PyTorch directory or use it standalone.
5+ ``` CMD
6+ # If you don't want to override the default settings
7+ auto.bat
8+
9+ # If you don't want to compile with CUDA
10+ cpu.bat
11+
12+ # If you want to compile with CUDA 8
13+ cuda8.bat
14+
15+ # If you want to compile with CUDA 9
16+ cuda9.bat
17+
18+ ```
19+
20+ # Using Examples
21+ ``` Python
22+ # The main difference in Python between Windows and Unix systems is multiprocessing
23+ # So please refactor your code into the following structure if you use DataLoader
24+ import torch
25+ def main ()
26+ for i, (x, y) in dataloader:
27+ # do something here
28+
29+ if __name__ == ' __main__' :
30+ main()
31+ ```
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ IF "%CUDA_PATH_V8_0%"=="" (
2121 set NO_CUDA = 1
2222 ) ELSE (
2323 set " CUDA_PATH = %CUDA_PATH_V8_0% "
24+ set PATH = %CUDA_PATH_V8_0% \bin;%PATH%
2425 set CMAKE_GENERATOR = Visual Studio 14 2015 Win64
2526 set " PREBUILD_COMMAND = %VS140COMNTOOLS% \..\..\VC\vcvarsall.bat"
2627 set PREBUILD_COMMAND_ARGS = x86_amd64
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ IF "%CUDA_PATH_V9_0%"=="" (
1616 set NO_CUDA = 1
1717) ELSE (
1818 set " CUDA_PATH = %CUDA_PATH_V9_0% "
19+ set PATH = %CUDA_PATH_V9_0% \bin;%PATH%
1920)
2021
2122set CMAKE_GENERATOR = Visual Studio 15 2017 Win64
You can’t perform that action at this time.
0 commit comments