Pytorch

Get Native Windows Arm64 Python

Please checkout Pre-release Python Installation for instructions

Get the latest source

GitHub - pytorch/pytorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration

Tutorial:https://github.com/pytorch/pytorch#from-source

git clone --recursive https://github.com/pytorch/pytorch cd pytorch git submodule sync git submodule update --init --recursive --jobs 0

Win10 limitation

Starting with Win11, x64 emulation is available for WoA, but for Win10, only x86 host toolchain is available.

We’ve seen that 32-bit linker results in out-of-memory error linking Pytorch.
So the following error is shown if the build is started on Win10:

Warning: 32-bit toolchain will be used, but 64-bit linker is recommended to avoid out-of-memory linker error! Warning: Please consider upgrading to Win11, where x64 emulation is enabled!

If LLVM is set manually (see below) then the error message is not perfect as the Visual Studio toolchain will be set to 32-bit version, but the manually set toolchain will override that.

Build developer version

python setup.py develop

Build with LLVM

LLVM is not supported explicitly by Pytorch.
However if CMake compiler path is set by environment variables, it’s won’t be overwritten by Visual Studio vcvars settings.

Test