Commit Graph
3 Commits
Author SHA1 Message Date
Ramakrishnan SivakumarandClaude Opus 4.8 f4a5db14e9 fix(rocm): detect version-suffixed HIP runtime on Windows (ROCm 7.x) (#2603)
* fix(rocm): detect version-suffixed HIP runtime on Windows

ROCm 7.x ships bin\amdhip64_7.dll rather than the bin\amdhip64.dll that
5.x/6.x used, so validate_rocm_root failed to detect a system ROCm 7.x
install (HIP_PATH/ROCM_PATH) and TheRock was downloaded anyway. Match the
amdhip64*.dll prefix instead. Verified against a real ROCm 7.1 install.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* address review: tighten HIP runtime match, update docs

Match only amdhip64.dll or amdhip64_<digits>.dll (reject amdhip64_backup.dll),
require a regular file, and update the header/docs wording. Add positive and
negative regression cases for the version-suffixed name.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-08 22:27:43 +00:00
Eugene Volen 6106b91f4f feat(rocm): detect externally-installed ROCm on Windows (#2508)
* feat(rocm): detect externally-installed ROCm on Windows

Extend system-ROCm reuse (previously Linux-only) to Windows: probe
bin\amdhip64.dll / lib\amdhip64.dll, use rocm-sdk.exe for the PATH
presence check, and treat HIP_PATH as the platform default.

* address review: drop redundant macOS guard, fix docs shell label

is_rocm_installed_system_wide no longer special-cases non-Linux/Windows:
resolve_rocm_root already returns nullopt where no HIP runtime exists, and
the only caller (will_install_therock) is gated to linux/windows. Docs
example labeled Linux only.

* harden rocm-sdk root detection against merged stderr

query_rocm_sdk_root captured only the first line of `rocm-sdk path --root`,
but run_process_with_output merges the child's stderr into stdout. rocm-sdk is
a Python console script that can emit warnings to stderr, so a warning could be
taken as the path, fail validation, and silently fall through to the platform
default. Collect all lines and pick the first that trims to an absolute path and
validates, via the pure helper pick_rocm_root_candidates (unit-tested).

Also resolve the ROCm root once in will_install_therock and thread it into the
version check (was resolving twice, up to two rocm-sdk spawns), drop the now
unused is_rocm_installed_system_wide, and add a direct include <optional>.

This mainly exercises the shared rocm-sdk (pip-wheel) path, which is most
common on Linux.
2026-07-01 15:15:49 +00:00
Eugene Volen 2d61b4da2c Detect externally-installed ROCm before downloading TheRock (#2498)
* Detect externally-installed ROCm before downloading TheRock

Resolve the ROCm root in priority order (ROCM_PATH, `rocm-sdk path
--root`, then /opt/rocm) instead of hardcoding /opt/rocm, so Lemonade
reuses a ROCm installed via wheels/rocm-cli rather than pulling its own
runtime. When the user explicitly selects a ROCm (ROCM_PATH/rocm-sdk),
relax the version gate to major.minor and accept it when no version file
is present. Adds a unit test for the resolver.

* Trim obvious comments and document system ROCm reuse

Drop comments that restate the code (per AGENTS.md), keeping only the
non-obvious rationale. Add user docs for reusing a system-installed ROCm
via ROCM_PATH / rocm-sdk.
2026-06-30 17:37:10 +00:00