Packaging ROCm Environment Wheels for Later Use
Heh, after half a day of fussing I found you can't extract Wheels directly from site-packages—you still have to pull them again from the official source. A few gigs of the ROCm all-in-one kit, precompiled binary Lego, so next time I don't have to sit waiting on source code for hours.
目录6 个章节
Introduction
My ROCm was downloaded from AMD's official nightly channel, and can be extracted into Wheels for convenient installation in other projects.
What Is a Wheel
Simply put, a Wheel (.whl file) is Python's "all-in-one installer package."
If you compare a Python library to a set of "Lego toys," then a Wheel is like a fully assembled finished product. You can play with it right after buying it, without having to assemble it from scratch against the parts diagram (source code).
Before Wheels appeared, Python commonly used source packages in .tar.gz format.
- Source package (sdist): Contains only code. If the library includes C++ or ROCm code (such as a compiled
torch), at install time the computer must have a compiler installed (such as MSVC or the HIP SDK), then compile on the spot for hours. - Wheel package: These are precompiled binaries. They have already been processed for a specific operating system (Windows/Linux) and architecture (x86/AMD GPU). At install time,
pipsimply extracts the files into thesite-packagesdirectory, which is extremely fast.
What's actually inside a Wheel package?
If you change the .whl extension to .zip and open it, you can see:
- Code folder: For example the
torchfolder, containing.pyfiles and compiled.dllfiles (Windows dynamic-link libraries). .dist-infofolder: This is the package's "ID card," recording the package version, dependencies, who developed it, and checksums for all files.
Enter the Environment
First enter the ComfyUI environment previously used for testing and compiling
cd D:\Softwares\StabilityMatrix\Data\Packages\ComfyUI
.\venv\Scripts\activate
View the Package List
pip list
Output
Package Version
-------------------------------------- --------------------------
aiohappyeyeballs 2.6.1
aiohttp 3.13.3
aiosignal 1.4.0
alembic 1.17.2
annotated-types 0.7.0
attrs 25.4.0
av 16.0.1
build 1.3.0
certifi 2026.1.4
charset-normalizer 3.4.4
cmake 4.0.0
colorama 0.4.6
comfyui-embedded-docs 0.3.1
comfyui_frontend_package 1.35.9
comfyui_workflow_templates 0.7.64
comfyui-workflow-templates-core 0.3.61
comfyui-workflow-templates-media-api 0.3.34
comfyui-workflow-templates-media-image 0.3.43
comfyui-workflow-templates-media-other 0.3.62
comfyui-workflow-templates-media-video 0.3.22
einops 0.8.1
expecttest 0.3.0
filelock 3.20.0
frozenlist 1.8.0
fsspec 2025.9.0
gguf 0.17.1
greenlet 3.3.0
huggingface-hub 0.36.0
hypothesis 5.35.1
idna 3.11
Jinja2 3.1.6
kornia 0.8.2
kornia_rs 0.1.10
lintrunner 0.12.7
Mako 1.3.10
MarkupSafe 2.1.5
mpmath 1.3.0
multidict 6.7.0
networkx 2.8.8
numpy 2.1.2
optree 0.13.0
packaging 25.0
pillow 12.0.0
pip 25.3
propcache 0.4.1
protobuf 6.33.2
psutil 7.1.0
pydantic 2.12.5
pydantic_core 2.41.5
pydantic-settings 2.12.0
pyproject_hooks 1.2.0
python-dotenv 1.2.1
PyYAML 6.0.3
regex 2025.11.3
requests 2.32.5
rocm 7.11.0a20260104
rocm-sdk-core 7.11.0a20260104
rocm-sdk-devel 7.11.0a20260104
rocm-sdk-libraries-gfx103X-dgpu 7.11.0a20260104
safetensors 0.7.0
scipy 1.16.3
sentencepiece 0.2.1
setuptools 79.0.1
six 1.17.0
sortedcontainers 2.4.0
spandrel 0.4.1
SQLAlchemy 2.0.45
sympy 1.13.3
tokenizers 0.22.1
torch 2.9.1+rocm7.11.0a20260104
torchaudio 2.9.0+rocm7.11.0a20260104
torchsde 0.2.6
torchvision 0.24.0+rocm7.11.0a20260104
tqdm 4.67.1
trampoline 0.1.2
transformers 4.57.3
typing_extensions 4.15.0
typing-inspection 0.4.2
urllib3 2.6.2
uv 0.9.21
wheel 0.45.1
yarl 1.22.0
The ones that need to be packaged here are those starting with rocm:
rocm 7.11.0a20260104
rocm-sdk-core 7.11.0a20260104
rocm-sdk-devel 7.11.0a20260104
rocm-sdk-libraries-gfx103X-dgpu 7.11.0a20260104
Package the Wheels
Use the following command to package
pip wheel rocm rocm-sdk-core rocm-sdk-devel rocm-sdk-libraries-gfx103X-dgpu --index-url https://rocm.nightlies.amd.com/v2-staging/gfx103X-dgpu/ --no-deps -w D:\Code\2\_temp
Output result
Looking in indexes: https://rocm.nightlies.amd.com/v2-staging/gfx103X-dgpu/
Collecting rocm
Downloading https://rocm.nightlies.amd.com/v2-staging/gfx103X-dgpu/rocm-7.11.0a20260117.tar.gz (15 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting rocm-sdk-core
Downloading https://rocm.nightlies.amd.com/v2-staging/gfx103X-dgpu/rocm_sdk_core-7.11.0a20260117-py3-none-win_amd64.whl (654.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 654.1/654.1 MB 68.6 MB/s 0:00:09
Collecting rocm-sdk-devel
Downloading https://rocm.nightlies.amd.com/v2-staging/gfx103X-dgpu/rocm_sdk_devel-7.11.0a20260117-py3-none-win_amd64.whl (1662.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 GB 50.1 MB/s 0:00:24
Collecting rocm-sdk-libraries-gfx103X-dgpu
Downloading https://rocm.nightlies.amd.com/v2-staging/gfx103X-dgpu/rocm_sdk_libraries_gfx103x_dgpu-7.11.0a20260117-py3-none-win_amd64.whl (174.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 174.2/174.2 MB 75.2 MB/s 0:00:02
Saved d:\code\2\_temp\rocm_sdk_core-7.11.0a20260117-py3-none-win_amd64.whl
Saved d:\code\2\_temp\rocm_sdk_devel-7.11.0a20260117-py3-none-win_amd64.whl
Saved d:\code\2\_temp\rocm_sdk_libraries_gfx103x_dgpu-7.11.0a20260117-py3-none-win_amd64.whl
Building wheels for collected packages: rocm
Building wheel for rocm (pyproject.toml) ... done
Created wheel for rocm: filename=rocm-7.11.0a20260117-py3-none-any.whl size=20096 sha256=24085fa9b394c516a1288297adcd18d25d279c39d3f5ac2cb0c316f75aa28c4a
Stored in directory: c:\users\deali\appdata\local\pip\cache\wheels\16\f6\32\7bd9cccb06a7f1ccbb85bd00ead32ef09260ab4f0ce8353ff2
Successfully built rocm
Summary
Sorry, I only found out after researching that you cannot extract Wheels from an already installed Lib\site-packages
So I had to re-download them from the official source
These packages are all very large; I downloaded them locally to make them convenient for later project use
I now have these packages locally:
Directory: D:\Code\2\_temp
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2026/1/18 10:31 654090627 rocm_sdk_core-7.11.0a20260117-py3-none-win_amd64.whl
-a--- 2026/1/18 10:31 1662025437 rocm_sdk_devel-7.11.0a20260117-py3-none-win_amd64.whl
-a--- 2026/1/18 10:31 174187137 rocm_sdk_libraries_gfx103x_dgpu-7.11.0a20260117-py3-none-win_amd64.whl
-a--- 2026/1/18 10:31 20096 rocm-7.11.0a20260117-py3-none-any.whl
-a--- 2026/1/5 15:58 151148776 torch-2.9.1+rocm7.11.0a20260104-cp312-cp312-win_amd64.whl
-a--- 2026/1/5 15:59 514989 torchaudio-2.9.0+rocm7.11.0a20260104-cp312-cp312-win_amd64.whl
-a--- 2026/1/5 16:01 1247290 torchvision-0.24.0+rocm7.11.0a20260104-cp312-cp312-win_amd64.whl
_EOF_
Packaging ROCm Environment Wheels for Later Use
- 本文作者:
- 程序设计实验室
- 版权声明:
- 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
相关文章
Windows + AMD ROCm + PyTorch:debuff拉满的6650xt A卡炼丹折腾经历
用6650XT在Windows上跑PyTorch?AMD官方都不支持这卡,还得自己编译ROCm。折腾一晚上环境变量和编译错误,结果连个wheel都没生成出来。所以为什么非要在Windows上给A卡炼丹?
2026-05-09 · ROCm · 约 1 分钟
告别N卡CUDA垄断,Windows+AMD显卡ROCm跑深度学习:手把手实现 MNIST 手写数字识别
在Windows+AMD的debuff下硬是编译了ROCm版PyTorch,拿MNIST这种“Hello World”来验货。用CNN而不是老掉牙的全连接网络,总算对得起显卡算力。跑完500个batch损失降到0.03,这种基础任务也就测个环境能用罢了。
2026-05-09 · ROCm · 约 1 分钟
Windows + AMD 显卡,终于能用 PyTorch 炼丹了
Windows+AMD+ROCm+PyTorch这地狱级组合居然跑通了。无非是用了官方ROCm和保守的PyTorch 2.9.1,避开新版本那些破事。下一步?总算能试试炼丹和AI画图了。
2026-05-09 · ROCm · 约 1 分钟
AMD显卡也能畅玩AI画图!ROCm+ComfyUI部署全指南
用StabilityMatrix在AMD显卡上部署ComfyUI,总算让ROCm派上点正经用场。可视化工作流比早期那堆破烂配置界面强多了,虽然启动时还得手动补依赖。看着GPU利用率拉满生成图像,这才算没白折腾。
2026-05-09 · ROCm · 约 1 分钟
讨论
共 0 条加载评论中…