- Match render/compute adapters and gate RR models by GPU capabilities - Add RDNA2 native texture kernels and fix FP16 rounding - Harden model builds, cache validation and packaging - Add startup tracing, timeouts, documentation and regression tests
24 lines
997 B
Bash
Executable File
24 lines
997 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
WINEGCC="${WINEGCC:-winegcc}"
|
|
WINEBUILD="${WINEBUILD:-winebuild}"
|
|
BRIDGE_ROOT="$ROOT/build/wine-nvcuda"
|
|
BUILD_ID="$(bash "$ROOT/scripts/runtime_build_id.sh")"
|
|
|
|
mkdir -p "$BRIDGE_ROOT/x86_64-unix" "$BRIDGE_ROOT/x86_64-windows"
|
|
MOTION_FLAGS=()
|
|
if [[ -x "${D4R_ROCM_DIR:-/opt/rocm}/lib/llvm/bin/clang++" ]]; then
|
|
"$ROOT/scripts/build_d4r_motion_kernels.sh" "$BRIDGE_ROOT/generated"
|
|
MOTION_FLAGS=(-DD4R_MOTION_KERNELS -I"$BRIDGE_ROOT/generated")
|
|
fi
|
|
"$WINEGCC" -m64 -shared -o "$BRIDGE_ROOT/x86_64-unix/nvcuda.dll" \
|
|
"-DD4R_RUNTIME_BUILD_ID=\"$BUILD_ID\"" \
|
|
"${MOTION_FLAGS[@]}" \
|
|
"$ROOT/tools/wine_nvcuda_bridge.c" \
|
|
-Wb,--export="$ROOT/tools/wine_nvcuda_bridge.spec" -ldl -lpthread
|
|
"$WINEBUILD" --dll --fake-module -E "$ROOT/tools/wine_nvcuda_bridge.spec" \
|
|
-F nvcuda.dll -b x86_64-windows -o "$BRIDGE_ROOT/x86_64-windows/nvcuda.dll"
|
|
printf 'Built Wine nvcuda bridge in %s\n' "$BRIDGE_ROOT"
|