Repository navigation
fix(windows): support ROCm imports and vendor-aware system checks - #447
spicystrippresident wants to merge 50 commits into
Conversation
… OSes ROCm 10.0.0 (stable, 2026-08-26) publishes torch 2.12.0 and torchvision 0.27.0 cp312 wheels for Windows and Linux on https://stable.repo.amd.com/rocm/whl-next/ with per-GPU kernel packs for gfx1100-gfx1103, gfx1150/gfx1151 and gfx1200/gfx1201, so the Radeon 780M (gfx1103) gets kernels alongside every target the ROCm 7.2.1 build had. Both OSes now share one torch/torchvision pin, the Windows setup installs the same kernel packs as the Linux image keeps, and the README names the Adrenalin 26.8.1 driver ROCm 10 needs on Windows. The protection bump moves the Linux image to ROCm 10 and bundles the ROCm payload on Linux. Refs Kruk2#408
Bundle application and dependency license texts, record exact source and model correspondence, and include the legal payload in frozen builds.\n\nDocument the private protection source as the sole reproducibility exception.
18.1.0 contains the current-CUDA-context and explicit NVENC stream changes the release builds compiled from a pinned PyAV commit. Pin it exactly because the VALI release wheel links the same pyav-ffmpeg 8.1.2-1 libraries. Drop cython/delvewheel from the dev extra; only the PyAV rebuild used them.
Patch releases within the 2.12 line that torch-tensorrt 2.12.0 accepts; the dev environment already runs them.
Also records the protection commit that fixes the release scripts' modes.
Show where supporter keys are sold in the system-check wizard and in the license dialog, and give translated messages for keys that are not accepted.
Newer versions load a new checkpoint file name, so older versions keep downloading the file they expect. The download skips the old file so users fetch only the checkpoint this version needs.
Keep downloaded models usable after upgrading.
Explain activation failures and update supporter documentation.
…el-name ltx) Inference-only restorer for the fine-tuned LTX-2.5 model, run in phased passes with one model on the GPU at a time: scan (detect, cuts, plan) -> VAE encode -> denoise -> decode + composite + encode. - jasna/ltx: track planning with one zooming follow camera per track and 121-frame windows at hop 88; video-only transformer port with prequantized INT8 ConvRot linears; lockstep sampler with overlap fusion and shared-prefix STG; block streaming from pinned RAM for low-VRAM GPUs; GPU crop/composite. - jasna/models/ltx_vae: vendored pure-PyTorch subset of the ltx-core video VAE (causal encoder, single-step diffusion decoder, tiled decode). - CLI: --restoration-model-name ltx, --ltx-large-canvas, --ltx-seed; --restoration-model-path now defaults per model. - Licensing: LTX-2.x Community License text and notices.
Use shared model loading for all LTX components and report missing access before engine setup. Clarify model access after app updates.
--ltx-fast uses an NVFP4 model on RTX 50-series GPUs. SageAttention, torch.compile and NATTEN are used when installed.
Sigma schedule and STG scale come from the file's metadata; STG 0 skips the perturbed pass.
…e warning Progress advances after every sampler step, and the Hadamard matrix is built directly so Dynamo no longer warns.
Standard and LTX cards plus seed, fast mode and sharper large mosaics options. LTX is disabled without an NVIDIA GPU or its model files.
Segments without one follow the job's model, and overlapping ranges are split by the later one. Each LTX segment is planned from its own frames and all LTX spans run in one batch.
Each LTX pass reports its share of the run and the time left; the control bar shows the pass name in place of the FPS.
…ense LtxModelFiles.placeholder() serves seeded random tensors with the real names, shapes and dtypes (jasna/ltx/trial_shapes.py), so every pass runs as in a real job. The output is not restored.
A "Trial run" switch runs LTX with placeholder weights to test speed. It is forced on when no LTX model is installed and offered at Start when a license is missing.
Independent upstream-main feature with bilingual guides.
| @@ -0,0 +1,86 @@ | |||
| """Narrow MMEngine import compatibility for the Windows ROCm torch wheel. | |||
There was a problem hiding this comment.
shouldn't that be a patch to mmengine in patches folder?
There was a problem hiding this comment.
| @@ -0,0 +1,21 @@ | |||
| # 媒体单测环境隔离 | |||
|
|
|||
| 统一 AMD 产品路线让 encoder 设置校验和 `NvidiaVideoEncoder` 的内部 vendor 选择真正跟随 | |||
There was a problem hiding this comment.
is this md file relevant to this PR?
| return struct.unpack("<I", data[value_offset : value_offset + 4])[0] | ||
|
|
||
|
|
||
| def _loaded_pytorch_accelerator_vendor() -> str | None: |
There was a problem hiding this comment.
Can't we use AcceleratorVendor that Jasna already has with the logic to detect it?
There was a problem hiding this comment.
Even simpler: leave os_utils unchanged and skip the check for non-NVIDIA in the GUI, the same way the CLI already does (main.py: if sys.platform == "win32" and is_nvidia_device():). The places are gui/system_checks.py (run_system_checks) and the sysmem row in gui/wizard.py. AMD users then don't see the row at all, and the untranslated "N/A (AMD/ROCm)…" text goes away.
|
|
||
|
|
||
| @pytest.fixture(scope="session", autouse=True) | ||
| def synchronize_windows_rocm_before_interpreter_teardown(): |
There was a problem hiding this comment.
how does it behave on linux? do we need that on linux?
| return _TRT_MODULE | ||
|
|
||
|
|
||
| def __getattr__(name: str) -> Any: |
There was a problem hiding this comment.
Is this needed? Every caller already imports jasna.trt lazily behind an NVIDIA check (rfdetr.py, yolo_tensorrt_compilation.py, unet4x_secondary_restorer.py), so AMD never reaches it. trt_runner.py still imports tensorrt at the top anyway. The __getattr__("trt") is a backward-compat shim, which we don't add. Please drop the changes to this file and test_trt_utils.py.
|
|
||
| before, after = result_path.read_text().split(",") | ||
| if before != "False": | ||
| pytest.skip("host did not reproduce the dangling-stdin subprocess failure") |
There was a problem hiding this comment.
Please remove this skip. If the precondition stops holding, the regression test quietly passes instead of failing. If the test can't reproduce on some hosts, skip it by platform condition, not by its own result.
Summary
Make public-source imports and system checks distinguish AMD/ROCm from NVIDIA/CUDA. Provide a narrow MMEngine compatibility layer and keep TensorRT optional instead of making AMD source runs import NVIDIA-only components.
Behavior and use
Use the existing source launcher and model interfaces. Detection/media tests declare their vendor assumptions; importing a module must not require another vendor's unavailable libraries.
Direct prerequisites and merge scope
None — this is an independently scoped root PR.
This branch contains only the root feature and its bilingual guides. It has no inherited feature-stack changes. The original four PRs are reused.
Feature-only parent-to-head review diff
Feature-owned paths: 13; review baseline:
81dc8b053fb317c063390daab1dab8289c2094df; head:17b69b015b2cf8201897ae17c79ee9799fdedfff. Existing CPU/native evidence limits remain unchanged.Upstream baseline:
81dc8b053fb317c063390daab1dab8289c2094df.Publication policy updated 2026-10-04: all 26 PRs may be open together with explicit prerequisites. This supersedes the earlier wait-to-submit notes in the prepared guides, not their validation or support limits.
Documentation
Validation
Independent upstream-main root: compile and owned focused tests passed (59 passed, 2 skipped). Platform skips do not count as native acceptance. Only owned focused tests were run for this standalone branch, not all upstream tests.
Current bilingual combined-stack CPU regression was rerun: 3141 passed, 225 skipped, 178 subtests passed. These totals describe the combined stack, not this PR independently.
All 26 exact-parent patches replay to their declared trees, and ordinary merges reconstruct the exact bilingual collection. Every feature has both language guides; documentation links and dependency coverage are checked. No real-video/GPU workload is run for this documentation/submission update.
Windows SDK/native asset rebuilding, whole-card telemetry, and real-hardware A/B are WAIVED_BY_USER_NOT_RUN, not PASS. Historical Linux native evidence is tied to its recorded baseline; untested Windows/NVIDIA/LTX and paid-model AMD paths are not certified.
Limits
This is compatibility infrastructure, not a new inference backend or evidence of Windows end-to-end performance. NVIDIA TensorRT behavior remains vendor-specific.
No private protection source, activation credentials, model weights, generated media, installed runtimes, or user configuration is included. rocDecode is not reintroduced.
中文說明 / Chinese
摘要
讓公開源碼的匯入與系統檢查區分 AMD/ROCm 和 NVIDIA/CUDA。提供限定範圍的 MMEngine 相容層,並將 TensorRT 保持為可選元件,避免 AMD 執行時強制匯入 NVIDIA 專用模組。
使用方式
沿用現有源碼啟動器與模型介面。檢測/媒體測試明確宣告顯卡廠商假設;匯入模組不應要求另一廠商不可用的函式庫。
直接前置與合併範圍
無;本項為獨立根功能 PR。
此分支只包含本根功能與雙語指南,不含繼承的功能栈變更;原有四個 PR 保留,不重複建立。
僅本功能的 parent-to-head 審查差異
本功能所屬路徑 13 個;審查基準
81dc8b053fb317c063390daab1dab8289c2094df,head17b69b015b2cf8201897ae17c79ee9799fdedfff。既有 CPU/原生驗收限制不變。英文為預設文件及 PR 主文,中文為對應版本。
2026-10-04 提交策略更新:26 項 PR 可先同時開放,說明中列清楚前置;取代準備文件中的先等待再提交策略,不改變驗收/支援限制。
驗證
獨立上游 main 分支的編譯與所屬聚焦測試通過(59 passed, 2 skipped);平台跳過不算原生驗收。此獨立分支只跑所屬聚焦測試,並非上游全量測試。
目前雙語整合集合重新通過 CPU 全量回歸:3141 passed, 225 skipped, 178 subtests passed。這是集合結果,不是單項 PR 的全量结果。
26 份精確 parent 補丁及普通合併均重建相同集合;每項都有中英文指南,連結與依賴覆蓋已檢查。本次不跑真實影片/GPU。Windows SDK/原生資產重建、全卡遙測、實機 A/B 為 WAIVED_BY_USER_NOT_RUN,不算 PASS;其他未測平台/格式仍未認證。
限制
這是相容基礎設施,不是新的推論後端,也不是 Windows 完整流程的效能證據。NVIDIA TensorRT 行為仍由對應後端負責。
不包含私有授權源碼、啟用憑證、模型權重、生成媒體、已安裝 runtime 或使用者設定,不恢復 rocDecode。