Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel7
outlinetrue

Get Native Windows Arm64 Python

Please checkout Pre-release Python Installation for instructions

Get the latest source

https://github.com/pytorch/pytorch

...

Code Block
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.

...

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

Code Block
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.

Code Block
$env:CMAKE_C_COMPILER:PATH="c:\\kg\\tools\\LLVM-14.0.0-rc1-woa64\\bin\\clang-cl.exe"
$env:CMAKE_CXX_COMPILER:PATH="c:\\kg\\tools\\LLVM-14.0.0-rc1-woa64\\bin\\clang-cl.exe"
$env:USE_OPENMP="OFF"
python setup.py develop

Test

Code Block
python test\test_torch.py