Problem Description
Issue1:
There is no torch package prebuild in https://rocm.nightlies.amd.com/v2/ for gfx1150/gfx1030/gfx906. I need it on Strix/Navi2/Radeon 7 for windows system. @geomin12 is looking at the strix/gfx1150.
Issue2:
At the same time, I tried to manually build pytorch locally follow the instructions: https://github.com/ROCm/TheRock/blob/main/external-builds/pytorch/README.md. But it also failed.
I tried to manually build torch locally today on windows Strix gfx1150, after a few fixes, I find that vs 2022 does not work with pytorch build, it required vs 2019. It might be the root reason why no torch package prebuild in nightlies.
Detailed info https://gist.github.com/AmosLewis/ac3536cc1c4e67abe9a318c35f20efcb?permalink_comment_id=5816129#gis… and https://gist.github.com/AmosLewis/ac3536cc1c4e67abe9a318c35f20efcb?permalink_comment_id=5816463#gis…
Analysis: torch-rocm local build required for visual studio for libomp.dll in build_prod_wheels.py and copy that to torch source code before build. But after I install Microsoft Visual C++ 2015–2019 Redistributable (x64) version 14.28.29914 via VC_redist.x64.exe download from microsoft website, looks like vs2019 does not have this libomp.dll. I also installed VS2022, it has this libomp.dll but pytorch source code side required vs2019 when cmake. VS2022 won't work.
Operating System
Windows10
CPU
AMD Ryzen AI 9 HX 370 w/ Radeon 890M
GPU
AMD Radeon(TM) 890M Graphics
ROCm Version
rocm7
ROCm Component
No response
Steps to Reproduce
python build_prod_wheels.py build `
--install-rocm --index-url https://rocm.nightlies.amd.com/v2/gfx1150/ `
--pytorch-dir C:/b/pytorch `
--pytorch-audio-dir C:/b/audio `
--pytorch-vision-dir C:/b/vision `
--output-dir %HOME%/tmp/pyout
With only VS2019 and without Visual Studio 2022 or no VS installed, it will show bug:
`
RuntimeError: VCToolsRedistDir not set, can't copy libomp to torch lib
With visual studios 2022 installed and `$env:VCToolsRedistDir = "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.44.35112" enviroment variables setup, it will show:
...
CMake Error at CMakeLists.txt:28 (project):
Generator
Visual Studio 16 2019
could not find any instance of Visual Studio.
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "C:\Users\chiliu12\Documents\src\TheRock\external-builds\pytorch\build_prod_wheels.py", line 977, in <module>
main(sys.argv[1:])
File "C:\Users\chiliu12\Documents\src\TheRock\external-builds\pytorch\build_prod_wheels.py", line 973, in main
args.func(args)
File "C:\Users\chiliu12\Documents\src\TheRock\external-builds\pytorch\build_prod_wheels.py", line 442, in do_build
do_build_pytorch(
File "C:\Users\chiliu12\Documents\src\TheRock\external-builds\pytorch\build_prod_wheels.py", line 756, in do_build_pytorch
exec([sys.executable, "setup.py", "bdist_wheel"], cwd=pytorch_dir, env=env)
File "C:\Users\chiliu12\Documents\src\TheRock\external-builds\pytorch\build_prod_wheels.py", line 171, in exec
subprocess.check_call(args, cwd=str(cwd), env=full_env)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2800.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\chiliu12\\Documents\\src\\TheRock\\.venv\\Scripts\\python.exe', 'setup.py', 'bdist_wheel']' returned non-zero exit status 1.
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
PS C:\WINDOWS\system32> (Get-WmiObject Win32_OperatingSystem).Version
10.0.26100
PS C:\WINDOWS\system32> (Get-WmiObject win32_Processor).Name
AMD Ryzen AI 9 HX 370 w/ Radeon 890M
PS C:\WINDOWS\system32> (Get-WmiObject win32_VideoController).Name
NVIDIA GeForce RTX 4070 Laptop GPU
Microsoft Remote Display Adapter
AMD Radeon(TM) 890M Graphics
PS C:\WINDOWS\system32>
Additional Information
No response
Problem Description
Issue1:
There is no torch package prebuild in https://rocm.nightlies.amd.com/v2/ for gfx1150/gfx1030/gfx906. I need it on Strix/Navi2/Radeon 7 for windows system. @geomin12 is looking at the strix/gfx1150.
Issue2:
At the same time, I tried to manually build pytorch locally follow the instructions: https://github.com/ROCm/TheRock/blob/main/external-builds/pytorch/README.md. But it also failed.
I tried to manually build torch locally today on windows Strix gfx1150, after a few fixes, I find that vs 2022 does not work with pytorch build, it required vs 2019. It might be the root reason why no torch package prebuild in nightlies.
Detailed info https://gist.github.com/AmosLewis/ac3536cc1c4e67abe9a318c35f20efcb?permalink_comment_id=5816129#gis… and https://gist.github.com/AmosLewis/ac3536cc1c4e67abe9a318c35f20efcb?permalink_comment_id=5816463#gis…
Analysis: torch-rocm local build required for visual studio for libomp.dll in build_prod_wheels.py and copy that to torch source code before build. But after I install Microsoft Visual C++ 2015–2019 Redistributable (x64) version 14.28.29914 via VC_redist.x64.exe download from microsoft website, looks like vs2019 does not have this libomp.dll. I also installed VS2022, it has this libomp.dll but pytorch source code side required vs2019 when cmake. VS2022 won't work.
Operating System
Windows10
CPU
AMD Ryzen AI 9 HX 370 w/ Radeon 890M
GPU
AMD Radeon(TM) 890M Graphics
ROCm Version
rocm7
ROCm Component
No response
Steps to Reproduce
With only VS2019 and without Visual Studio 2022 or no VS installed, it will show bug:
`
With visual studios 2022 installed and `$env:VCToolsRedistDir = "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.44.35112" enviroment variables setup, it will show:
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
PS C:\WINDOWS\system32> (Get-WmiObject Win32_OperatingSystem).Version
10.0.26100
PS C:\WINDOWS\system32> (Get-WmiObject win32_Processor).Name
AMD Ryzen AI 9 HX 370 w/ Radeon 890M
PS C:\WINDOWS\system32> (Get-WmiObject win32_VideoController).Name
NVIDIA GeForce RTX 4070 Laptop GPU
Microsoft Remote Display Adapter
AMD Radeon(TM) 890M Graphics
PS C:\WINDOWS\system32>
Additional Information
No response