Bundle the ROCm 7.2.4 runtime in the release zip
This commit is contained in:
1 parent
bc31abdd50
commit
1952452830
12 files changed
+100
-16
No files matched your search
@@ -61,10 +61,10 @@ The release zip works like an OptiScaler release: its contents go into the folde
|
||||
1. Extract `d4r-<version>.zip` there. It contains:
|
||||
- OptiScaler 0.9.4 as `dxgi.dll`, with an `OptiScaler.ini` set up for d4r;
|
||||
- the d4r-patched vkd3d-proton (`d3d12.dll`, `d3d12core.dll`);
|
||||
- an `d4r` folder with the shim, the CUDA bridge, ZLUDA, the native kernels, this game's `d4r.ini`, and NVIDIA's `nvngx_dlss.dll` (310.7) and `_nvngx.dll`.
|
||||
- an `d4r` folder with the shim, the CUDA bridge, ZLUDA, the ROCm 7.2.4 runtime, the native kernels, this game's `d4r.ini`, and NVIDIA's `nvngx_dlss.dll` (310.7) and `_nvngx.dll`.
|
||||
2. In Steam, select GE-Proton 11 for the game and set these launch options: `PROTON_FORCE_NVAPI=1 DXVK_NVAPI_GPU_ARCH=AD100 %command%`.
|
||||
|
||||
The only other requirement is ROCm's HIP runtime 7.x, installed from your distribution. The zip's NVIDIA files and the kernels built from NVIDIA's code are not covered by this repository's license (see [NOTICE](NOTICE)). The Proton prefix and the system are not changed. [packaging/D4R_README.txt](packaging/D4R_README.txt) is the full guide that ships in the zip; `scripts/package_release.sh` builds the zip (see [docs/building.md](docs/building.md#7-package-a-release)).
|
||||
ROCm does not need to be installed: the zip includes its runtime (from AMD's Ubuntu 22.04 packages, which run under Steam's container runtime on any distribution). The zip's NVIDIA files and the kernels built from NVIDIA's code are not covered by this repository's license (see [NOTICE](NOTICE)). The Proton prefix and the system are not changed. [packaging/D4R_README.txt](packaging/D4R_README.txt) is the full guide that ships in the zip; `scripts/package_release.sh` builds the zip (see [docs/building.md](docs/building.md#7-package-a-release)).
|
||||
|
||||
## Requirements (building from source)
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ The following DirectX 12 games run DLSS Super Resolution through d4r on the test
|
||||
|---|---|---|---|
|
||||
| SILENT HILL Townfall | Works | Works | Works |
|
||||
| Ghost of Tsushima DIRECTOR'S CUT | Works | Works | Works |
|
||||
| Ready or Not | Works | Works; visible graphical artifacts | Works; minor artifacts |
|
||||
| Ready or Not | Works | Works; visible graphical artifacts with hdr enabled | Works |
|
||||
| | | | |
|
||||
| | | | |
|
||||
| | | | |
|
||||
|
||||
@@ -75,7 +75,7 @@ The release zip (`scripts/package_release.sh`) is unpacked into the folder that
|
||||
**Settings.** When an `d4r.ini` sits next to the shim, the shim turns it into the same environment variables the developer launcher sets, with the release's defaults. A variable that is already set, for example in the launch options, wins. Settings for the Linux side (ZLUDA's and the bridge's) are handed to the bridge through `d4rSetEnv` right after it is loaded, before its first CUDA call.
|
||||
|
||||
**Loading ROCm.** Steam runs GE-Proton 11 inside its container runtime (SteamLinuxRuntime_4), whose library search path has no ROCm. The bridge therefore:
|
||||
- loads HIP, HSA and comgr by path, from `RocmDir` (default `/opt/rocm`);
|
||||
- loads HIP, HSA and comgr by path, from `RocmDir` (default: the release's bundled `d4r/rocm`, else `/opt/rocm`);
|
||||
- looks up any dependency they lack in the host's library directories, which the container mounts under `/run/host`;
|
||||
- sets `XDG_CACHE_HOME` only while ZLUDA initialises, so ZLUDA's kernel cache goes to `~/.cache/d4r` without affecting the rest of the game.
|
||||
|
||||
|
||||
+2
-1
@@ -84,6 +84,7 @@ In the game, pick DLSS as the upscaler (OptiScaler intercepts it). Every setting
|
||||
## 7. Package a release
|
||||
|
||||
```sh
|
||||
scripts/fetch_rocm_runtime.sh # -> ~/.cache/d4r-rocm-runtime (AMD's ROCm 7.2.4 runtime, checksummed)
|
||||
D4R_OPTISCALER=/path/to/OptiScaler_0.9.4.7z \
|
||||
D4R_DLSS_DLLS=/path/to/310.7/nvngx_dlss.dll:/path/to/310.9/nvngx_dlss.dll \
|
||||
D4R_BUNDLE_DLSS=/path/to/nvngx_dlss.dll D4R_BUNDLE_NGX=/path/to/_nvngx.dll D4R_BUNDLE_TEX=kernels/out/native \
|
||||
@@ -96,7 +97,7 @@ The script:
|
||||
- writes the kernel manifest from the DLLs you list (it records hashes of their PTX, nothing else);
|
||||
- stages OptiScaler as `dxgi.dll` with the settings in `packaging/optiscaler.settings`;
|
||||
- adds NVIDIA's two DLLs and the texture kernels (built from NVIDIA's PTX by `kernels/build.sh tex`);
|
||||
- zips the result together with the ZLUDA and vkd3d-proton builds, `packaging/d4r.ini`, the licenses and the patches.
|
||||
- zips the result together with the ZLUDA and vkd3d-proton builds, the ROCm runtime (as `d4r/rocm`), `packaging/d4r.ini`, the licenses and the patches.
|
||||
|
||||
The NVIDIA files are not covered by d4r's license; redistributing them is up to whoever publishes the zip. `D4R_BUNDLE_NVIDIA=0` builds `d4r-<version>-nonvidia.zip` without them and without the texture kernels. [architecture.md](architecture.md#portable-installs-the-release-zip) describes how the installed files work together.
|
||||
|
||||
|
||||
@@ -14,9 +14,8 @@ What you need
|
||||
-------------
|
||||
- An AMD Radeon RX 7000 series GPU (RDNA3). The fast kernels are built for gfx1101
|
||||
(RX 7700 XT, RX 7800 XT). Other RDNA3 cards run DLSS without them, which is much slower.
|
||||
- Linux with ROCm's HIP runtime, version 7 (the file libamdhip64.so.7). ROCm 7.2 was tested.
|
||||
Arch Linux: the hip-runtime-amd package. Ubuntu, Fedora and others: the ROCm HIP runtime package
|
||||
of your distribution or of AMD's ROCm repository.
|
||||
- Linux with the amdgpu kernel driver (/dev/kfd). ROCm itself is not needed: the zip includes the
|
||||
ROCm 7.2.4 runtime in d4r/rocm. RocmDir in d4r/d4r.ini selects another ROCm installation instead.
|
||||
- GE-Proton 11 (tested: GE-Proton11-3), selected for the game in Steam.
|
||||
@clean - Two NVIDIA files, which this zip does not include:
|
||||
@clean - nvngx_dlss.dll, the DLSS library, version 310.7 or 310.9 (tested: 310.7.0 and 310.9.1).
|
||||
|
||||
@@ -18,7 +18,7 @@ It is an early release, tested on one GPU (RX 7700 XT) in SILENT HILL Townfall a
|
||||
## Requirements
|
||||
|
||||
- AMD Radeon RX 7000 series. The fast kernels are built for gfx1101 (RX 7700 XT, RX 7800 XT). Other RDNA3 cards run DLSS without them, which is much slower.
|
||||
- The ROCm HIP runtime 7.x (`libamdhip64.so.7`), from your distribution. ROCm 7.2 was tested.
|
||||
- The amdgpu kernel driver (`/dev/kfd`). The ROCm 7.2.4 runtime is included in `d4r/rocm`; nothing needs to be installed.
|
||||
- GE-Proton 11 (tested: GE-Proton11-3).
|
||||
|
||||
## What is in the zip
|
||||
@@ -29,6 +29,7 @@ It is an early release, tested on one GPU (RX 7700 XT) in SILENT HILL Townfall a
|
||||
- `d4r/d4r.ini` holds the settings for that game. The default model is DLSS 4 (K); E (DLSS 3 CNN) and M (DLSS 4.5) are one line away.
|
||||
- **NVIDIA:** DLSS 310.7.0 (`nvngx_dlss.dll`), the NGX runtime from driver 596.36 (`_nvngx.dll`), and five DLSS kernels built from NVIDIA's code with parts replaced by d4r's.
|
||||
- **ZLUDA** with d4r's patches: CUDA on ROCm.
|
||||
- **ROCm 7.2.4 runtime** (HIP, HSA, comgr), unmodified, from AMD's Ubuntu 22.04 packages.
|
||||
- **vkd3d-proton** with d4r's patch, so every frame shows its own DLSS result (no added latency).
|
||||
- **OptiScaler 0.9.4**, unmodified, set up to hand the game's DLSS calls to d4r.
|
||||
|
||||
|
||||
@@ -18,6 +18,16 @@ Third-party software, unmodified or patched by d4r:
|
||||
commit @VKD3D_COMMIT@ with d4r/source/patches/vkd3d-proton/0001 applied,
|
||||
built with its build-win64.txt cross file (meson --buildtype release).
|
||||
Licenses: d4r/licenses/vkd3d-proton-*.txt
|
||||
d4r/rocm/lib/ ROCm 7.2.4 runtime, unmodified, from AMD's Ubuntu 22.04 packages
|
||||
(https://repo.radeon.com/rocm/apt/7.2.4): HIP (hip-runtime-amd, MIT),
|
||||
comgr (NCSA; contains LLVM, Apache License 2.0 with LLVM exceptions),
|
||||
ROCr (hsa-rocr, NCSA) and rocprofiler-register (MIT).
|
||||
Sources: https://github.com/ROCm/rocm-systems and https://github.com/ROCm/llvm-project,
|
||||
tag rocm-7.2.4. Licenses: d4r/licenses/ROCm-*
|
||||
libelf.so.1 (elfutils 0.186, GNU LGPL 3.0 or GPL 2.0) and libnuma.so.1 (numactl 2.0.14,
|
||||
GNU LGPL 2.1), unmodified, from Ubuntu 22.04's libelf1 and libnuma1 packages; their
|
||||
sources are Ubuntu's elfutils 0.186-1ubuntu0.1 and numactl 2.0.14-3ubuntu2 source packages.
|
||||
Licenses: d4r/licenses/ROCm-lib*-copyright.txt
|
||||
dxgi.dll OptiScaler 0.9.4 (GNU GPL 3.0), unmodified OptiScaler.dll renamed to dxgi.dll.
|
||||
Source: https://github.com/optiscaler/OptiScaler/tree/v0.9.4
|
||||
License: d4r/licenses/OptiScaler-LICENSE-GPL-3.0.txt
|
||||
|
||||
@@ -4,10 +4,11 @@
|
||||
# usage: sh d4r/d4r-check.sh [GAME_FOLDER] [ROCM_DIR]
|
||||
GAME="${1:-.}"
|
||||
D4R="$GAME/d4r"
|
||||
# ROCm: the argument, else d4r.ini's RocmDir, else D4R_ROCM_DIR, else /opt/rocm
|
||||
# ROCm: the argument, else d4r.ini's RocmDir, else the bundled d4r/rocm, else D4R_ROCM_DIR, else /opt/rocm
|
||||
ini_rocm=$(sed -n 's/^[[:space:]]*RocmDir[[:space:]]*=[[:space:]]*\([^;#]*\).*/\1/p' "$D4R/d4r.ini" 2>/dev/null | tail -1 | sed 's/[[:space:]]*$//')
|
||||
[ "$ini_rocm" = auto ] && ini_rocm=
|
||||
case "$ini_rocm" in "~/"*) ini_rocm="$HOME/${ini_rocm#\~/}" ;; esac
|
||||
[ -z "$ini_rocm" ] && [ -d "$D4R/rocm/lib" ] && ini_rocm="$D4R/rocm"
|
||||
ROCM="${2:-${ini_rocm:-${D4R_ROCM_DIR:-/opt/rocm}}}"
|
||||
problems=0
|
||||
ok() { printf ' ok %s\n' "$1"; }
|
||||
@@ -35,7 +36,7 @@ found=
|
||||
for dir in "$ROCM/lib" /opt/rocm/lib /usr/lib /usr/lib64 /usr/lib/x86_64-linux-gnu; do
|
||||
[ -e "$dir/libamdhip64.so.7" ] && { found="$dir"; break; }
|
||||
done
|
||||
[ -n "$found" ] && ok "ROCm HIP runtime ($found/libamdhip64.so.7)" || bad "ROCm HIP runtime 7.x (libamdhip64.so.7); install your distribution's HIP runtime package"
|
||||
[ -n "$found" ] && ok "ROCm HIP runtime ($found/libamdhip64.so.7)" || bad "ROCm HIP runtime 7.x (libamdhip64.so.7); re-extract the d4r zip, which includes it in d4r/rocm"
|
||||
[ -e /dev/kfd ] && ok "/dev/kfd (ROCm compute device)" || bad "/dev/kfd: the amdgpu compute interface is not available"
|
||||
target=""
|
||||
for props in /sys/class/kfd/kfd/topology/nodes/*/properties; do
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ DirectOutput = auto
|
||||
|
||||
[Paths]
|
||||
; Linux paths.
|
||||
; ROCm installation (default /opt/rocm)
|
||||
; ROCm installation (default: the ROCm runtime in d4r\rocm, else /opt/rocm)
|
||||
RocmDir = auto
|
||||
; Cache for the compiled DLSS kernels (default ~/.cache/d4r). The first launch fills it.
|
||||
CacheDir = auto
|
||||
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env bash
|
||||
# Fetches the ROCm user-space runtime the release bundles in d4r/rocm: HIP, HSA, comgr and
|
||||
# rocprofiler-register from AMD's ROCm 7.2.4 packages for Ubuntu 22.04, plus the libelf and libnuma
|
||||
# they need, which Steam's container runtime lacks. These builds need only glibc 2.34, so they run
|
||||
# in SteamLinuxRuntime_4 on any distribution (a rolling distribution's ROCm may need a newer glibc).
|
||||
#
|
||||
# usage: scripts/fetch_rocm_runtime.sh [OUT_DIR] (default: ~/.cache/d4r-rocm-runtime)
|
||||
# Result: OUT_DIR/lib/<soname> for each library and OUT_DIR/licenses/.
|
||||
set -euo pipefail
|
||||
|
||||
OUT="$(realpath -m "${1:-$HOME/.cache/d4r-rocm-runtime}")"
|
||||
AMD=https://repo.radeon.com/rocm/apt/7.2.4/pool/main
|
||||
UBUNTU=http://archive.ubuntu.com/ubuntu/pool/main
|
||||
# url sha256
|
||||
PACKAGES=(
|
||||
"$AMD/h/hip-runtime-amd/hip-runtime-amd_7.2.53211.70204-93~22.04_amd64.deb 2b0fc15d4456bc35370f33672b202b43f2af1aceac47a42c22d1370b2f46968f"
|
||||
"$AMD/c/comgr/comgr_3.0.0.70204-93~22.04_amd64.deb 58460d117131369a248d334ba749609abea8591cd05752ac572c9a10f31ac006"
|
||||
"$AMD/h/hsa-rocr/hsa-rocr_1.18.0.70204-93~22.04_amd64.deb 7fccbb91e38fadd126538f15e02c66e20db717a60eb03f2a045e47497bf67405"
|
||||
"$AMD/r/rocprofiler-register/rocprofiler-register_0.6.0.70204-93~22.04_amd64.deb c2780e37a7217329b5d3d40e682ae6979481b1a59b86415a0cdf849b9c142bfd"
|
||||
"$UBUNTU/e/elfutils/libelf1_0.186-1ubuntu0.1_amd64.deb 2cc781614b045b450a1e073ee3b0902f393ee58ede1d2ea4526ad805fcccf538"
|
||||
"$UBUNTU/n/numactl/libnuma1_2.0.14-3ubuntu2_amd64.deb 0721c89001fbbd1ada23e89da5d60e762763c1a7b3dc814a2e9a518480a8043d"
|
||||
)
|
||||
# soname, the file it names inside the packages
|
||||
LIBRARIES=(
|
||||
"libamdhip64.so.7 opt/rocm-7.2.4/lib/libamdhip64.so.7"
|
||||
"libamd_comgr.so.3 opt/rocm-7.2.4/lib/libamd_comgr.so.3"
|
||||
"libhsa-runtime64.so.1 opt/rocm-7.2.4/lib/libhsa-runtime64.so.1"
|
||||
"librocprofiler-register.so.0 opt/rocm-7.2.4/lib/librocprofiler-register.so.0"
|
||||
"libelf.so.1 usr/lib/x86_64-linux-gnu/libelf.so.1"
|
||||
"libnuma.so.1 usr/lib/x86_64-linux-gnu/libnuma.so.1"
|
||||
)
|
||||
LICENSES=(
|
||||
"HIP-LICENSE.md opt/rocm-7.2.4/share/doc/hip/LICENSE.md"
|
||||
"comgr-LICENSE.txt opt/rocm-7.2.4/share/doc/amd_comgr/LICENSE.txt"
|
||||
"ROCr-LICENSE.md opt/rocm-7.2.4/share/doc/hsa-rocr/LICENSE.md"
|
||||
"rocprofiler-register-LICENSE.md opt/rocm-7.2.4/share/doc/rocprofiler-register/LICENSE.md"
|
||||
"libelf-copyright.txt usr/share/doc/libelf1/copyright"
|
||||
"libnuma-copyright.txt usr/share/doc/libnuma1/copyright"
|
||||
)
|
||||
|
||||
TMP="$(mktemp -d)"
|
||||
trap 'rm -rf "$TMP"' EXIT
|
||||
mkdir -p "$TMP/root"
|
||||
for entry in "${PACKAGES[@]}"; do
|
||||
read -r url sha <<< "$entry"
|
||||
deb="$TMP/$(basename "$url")"
|
||||
curl -fsSL -o "$deb" "$url"
|
||||
echo "$sha $deb" | sha256sum -c --quiet
|
||||
data="$(ar t "$deb" | grep '^data\.tar')"
|
||||
ar p "$deb" "$data" | tar -x -C "$TMP/root" -f - --use-compress-program="$(case "$data" in *.zst) echo zstd -d ;; *.xz) echo xz -d ;; *) echo gzip -d ;; esac)"
|
||||
done
|
||||
|
||||
rm -rf "$OUT"
|
||||
mkdir -p "$OUT/lib" "$OUT/licenses"
|
||||
for entry in "${LIBRARIES[@]}"; do
|
||||
read -r soname path <<< "$entry"
|
||||
cp -L "$TMP/root/$path" "$OUT/lib/$soname"
|
||||
done
|
||||
for entry in "${LICENSES[@]}"; do
|
||||
read -r name path <<< "$entry"
|
||||
cp "$TMP/root/$path" "$OUT/licenses/$name"
|
||||
done
|
||||
printf 'ROCm runtime in %s (%s)\n' "$OUT" "$(du -sh "$OUT" | cut -f1)"
|
||||
@@ -11,6 +11,8 @@
|
||||
# D4R_ZLUDA_DIR ZLUDA build with patches/zluda applied (libnvcuda.so) default ~/.cache/d4r-zluda-current
|
||||
# D4R_VKD3D_DIR d4r-patched vkd3d-proton (d3d12.dll, d3d12core.dll) default ~/.cache/d4r-vkd3d-d4r
|
||||
# D4R_ROCM_DIR ROCm with clang, for the kernels default /opt/rocm
|
||||
# D4R_ROCM_RUNTIME ROCm runtime bundled as d4r/rocm (scripts/fetch_rocm_runtime.sh)
|
||||
# default ~/.cache/d4r-rocm-runtime
|
||||
# D4R_GPU_ARCHS GPU targets to build kernels for default gfx1101
|
||||
# D4R_OPTISCALER_LICENSE OptiScaler's LICENSE (GPL-3.0) text; default: the system's SPDX copy
|
||||
# D4R_VKD3D_SRC vkd3d-proton source checkout, for its license files default ~/.cache/d4r-vkd3d-proton
|
||||
@@ -34,11 +36,12 @@ STAGE="$OUT/$NAME"
|
||||
ZLUDA="${D4R_ZLUDA_DIR:-$HOME/.cache/d4r-zluda-current}"
|
||||
VKD3D="${D4R_VKD3D_DIR:-$HOME/.cache/d4r-vkd3d-d4r}"
|
||||
ROCM="${D4R_ROCM_DIR:-/opt/rocm}"
|
||||
ROCM_RUNTIME="${D4R_ROCM_RUNTIME:-$HOME/.cache/d4r-rocm-runtime}"
|
||||
ARCHS="${D4R_GPU_ARCHS:-gfx1101}"
|
||||
: "${D4R_OPTISCALER:?set D4R_OPTISCALER to the OptiScaler release archive or folder}"
|
||||
: "${D4R_DLSS_DLLS:?set D4R_DLSS_DLLS to the nvngx_dlss.dll files the kernel manifest accepts}"
|
||||
for f in "$ZLUDA/libnvcuda.so" "$VKD3D/d3d12.dll" "$VKD3D/d3d12core.dll"; do
|
||||
[[ -f "$f" ]] || { echo "missing $f" >&2; exit 2; }
|
||||
for f in "$ZLUDA/libnvcuda.so" "$VKD3D/d3d12.dll" "$VKD3D/d3d12core.dll" "$ROCM_RUNTIME/lib/libamdhip64.so.7"; do
|
||||
[[ -f "$f" ]] || { echo "missing $f (the ROCm runtime comes from scripts/fetch_rocm_runtime.sh)" >&2; exit 2; }
|
||||
done
|
||||
|
||||
# D4R_SKIP_BUILD=1 packages the shim and bridge already in build/ (e.g. the binaries that were tested)
|
||||
@@ -48,7 +51,7 @@ if [[ "${D4R_SKIP_BUILD:-0}" != 1 ]]; then
|
||||
fi
|
||||
|
||||
rm -rf "$STAGE"
|
||||
mkdir -p "$STAGE/d4r/zluda" "$STAGE/d4r/ngx" "$STAGE/d4r/kernels" "$STAGE/d4r/licenses" "$STAGE/d4r/source"
|
||||
mkdir -p "$STAGE/d4r/zluda" "$STAGE/d4r/rocm" "$STAGE/d4r/ngx" "$STAGE/d4r/kernels" "$STAGE/d4r/licenses" "$STAGE/d4r/source"
|
||||
TMP="$(mktemp -d)"
|
||||
trap 'rm -rf "$TMP"' EXIT
|
||||
|
||||
@@ -94,6 +97,7 @@ cp "$VKD3D/d3d12.dll" "$VKD3D/d3d12core.dll" "$STAGE/"
|
||||
cp "$ROOT/build/d4r_nvngx.dll" "$STAGE/d4r/nvngx.dll"
|
||||
cp "$ROOT/build/wine-nvcuda/x86_64-unix/nvcuda.dll.so" "$STAGE/d4r/nvcuda.dll"
|
||||
cp "$ZLUDA/libnvcuda.so" "$STAGE/d4r/zluda/libcuda.so"
|
||||
cp -r "$ROCM_RUNTIME/lib" "$STAGE/d4r/rocm/lib"
|
||||
cp "$ROOT/packaging/d4r.ini" "$STAGE/d4r/d4r.ini"
|
||||
cp "$ROOT/packaging/d4r-check.sh" "$STAGE/d4r/d4r-check.sh"
|
||||
if [[ "$VARIANT" == full ]]; then
|
||||
@@ -128,6 +132,7 @@ cp "$ZLUDA_SRC/ext/llvm-project/llvm/LICENSE.TXT" "$L/LLVM-LICENSE.txt"
|
||||
cp "$VKD3D_SRC/LICENSE" "$L/vkd3d-proton-LICENSE.txt"
|
||||
cp "$VKD3D_SRC/COPYING" "$L/vkd3d-proton-COPYING.txt"
|
||||
cp "${D4R_OPTISCALER_LICENSE:-/usr/share/licenses/spdx/GPL-3.0-only.txt}" "$L/OptiScaler-LICENSE-GPL-3.0.txt"
|
||||
for f in "$ROCM_RUNTIME"/licenses/*; do cp "$f" "$L/ROCm-$(basename "$f")"; done
|
||||
mkdir -p "$STAGE/d4r/source/patches"
|
||||
cp -r "$ROOT/patches/zluda" "$ROOT/patches/vkd3d-proton" "$STAGE/d4r/source/patches/"
|
||||
ZLUDA_COMMIT="$(git -C "$ZLUDA_SRC" rev-parse HEAD 2>/dev/null || echo unknown)"
|
||||
|
||||
@@ -495,8 +495,12 @@ static void load_portable_config()
|
||||
|
||||
const std::string zluda = ini_value(ini, "paths", "ZludaDir");
|
||||
portable_set_unix("D4R_ZLUDA_LIBCUDA", (zluda.empty() ? g_portable.unixDir + "/zluda" : zluda) + "/libcuda.so");
|
||||
if (const std::string rocm = ini_value(ini, "paths", "RocmDir"); !rocm.empty())
|
||||
// The release's bundled ROCm runtime unless d4r.ini names another
|
||||
const std::string rocm = ini_value(ini, "paths", "RocmDir");
|
||||
if (!rocm.empty())
|
||||
portable_set_unix("D4R_ROCM_DIR", rocm);
|
||||
else if (!g_portable.unixDir.empty() && GetFileAttributesW((dir + L"\\rocm\\lib").c_str()) != INVALID_FILE_ATTRIBUTES)
|
||||
portable_set_unix("D4R_ROCM_DIR", g_portable.unixDir + "/rocm");
|
||||
const std::string cache = ini_value(ini, "paths", "CacheDir");
|
||||
portable_set_unix("D4R_ZLUDA_CACHE_HOME", cache.empty() ? "~/.cache/d4r" : cache);
|
||||
|
||||
|
||||
Reference in new issue
Block a user