Skip to content

Instantly share code, notes, and snippets.

@AmosLewis
Last active October 23, 2025 22:15
Show Gist options
  • Save AmosLewis/ac3536cc1c4e67abe9a318c35f20efcb to your computer and use it in GitHub Desktop.
Save AmosLewis/ac3536cc1c4e67abe9a318c35f20efcb to your computer and use it in GitHub Desktop.

GPU: AMD radeon tm 890M graphics AMD Radeon™ 890M integrated GPU is based on the gfx1150 architecture, which corresponds to the RDNA 3.5 generation used in AMD's Strix Point APUs like the Ryzen AI 300 series

Issue:

PS C:\Users\chiliu12\Documents\src> git clone https://github.com/ROCm/TheRock.git
git : The term 'git' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ git clone https://github.com/ROCm/TheRock.git
+ ~~~
    + CategoryInfo          : ObjectNotFound: (git:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Solution:

Install git by https://git-scm.com/downloads/win Install python3.12

Issue:

PS C:\Users\chiliu12\Documents\src\TheRock> python3 -m venv venv
PS C:\Users\chiliu12\Documents\src\TheRock> source venv/bin/activate
source : The term 'source' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ source venv/bin/activate
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (source:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Solution: RUN PowerShell as Administrator

PS C:\Users\chiliu12\Documents\src\TheRock> venv\Scripts\Activate.ps1
venv\Scripts\Activate.ps1 : File C:\Users\chiliu12\Documents\src\TheRock\venv\Scripts\Activate.ps1 cannot be loaded
because running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ venv\Scripts\Activate.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\chiliu12\Documents\src\TheRock> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): A
PS C:\Users\chiliu12\Documents\src\TheRock> venv\Scripts\Activate.ps1
(venv) PS C:\Users\chiliu12\Documents\src\TheRock>
@AmosLewis
Copy link
Author

AmosLewis commented Oct 22, 2025

Retry this:

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

when try to download and install vs2019:
Downloads for Visual Studio Subscribers
Older versions require an active Visual Studio Subscription. Choose a product below and click on the download button to log in to your Visual Studio (MSDN) subscription and gain access to the older versions.

Failed try: add this

    if is_windows:
        env["CMAKE_GENERATOR"] = "Visual Studio 17 2022"
        env["CMAKE_GENERATOR_PLATFORM"] = "x64"
        env["TORCH_CMAKE_GENERATOR"] = "Visual Studio 17 2022"
        env["TORCH_CMAKE_GENERATOR_PLATFORM"] = "x64"

before
exec([sys.executable, "setup.py", "bdist_wheel"], cwd=pytorch_dir, env=env)

@AmosLewis
Copy link
Author

AmosLewis commented Oct 23, 2025

start menu search x64 Native Tools Command Prompt for Visual Studio 2022

cd TheRock

.venv\Scripts\activate.bat

python -m pip install --index-url https://rocm.nightlies.amd.com/v2/gfx1150/ "rocm[libraries,devel]"

# Successfully installed rocm-7.10.0a20251023 rocm-sdk-core-7.10.0a20251023 rocm-sdk-devel-7.10.0a20251023 rocm-sdk-libraries-gfx1150-7.10.0a20251023
cd external-builds\pytorch

python pytorch_torch_repo.py checkout --checkout-dir C:/b/pytorch
python pytorch_audio_repo.py checkout --checkout-dir C:/b/audio
python pytorch_vision_repo.py checkout --checkout-dir C:/b/vision

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 %USERPROFILE%/tmp/pyout ^
  --clean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment