detectors/rocm: automatically override HSA_OVERRIDE_GFX_VERSION for couple of known chipsets

This commit is contained in:
Indrek Mandre
2024-02-04 15:32:08 +02:00
parent 77fc38c84f
commit 24cae6de47
2 changed files with 35 additions and 1 deletions

View File

@@ -2,6 +2,13 @@
# shellcheck shell=bash
# Compile YoloV8 ONNX files into ROCm MIGraphX files
OVERRIDE=$(cd /opt/frigate && python3 -c 'import frigate.detectors.plugins.rocm as rocm; print(rocm.auto_override_gfx_version())')
if ! test -z "$OVERRIDE"; then
echo "Using HSA_OVERRIDE_GFX_VERSION=${OVERRIDE}"
export HSA_OVERRIDE_GFX_VERSION=$OVERRIDE
fi
for onnx in /config/model_cache/yolov8/*.onnx
do
mxr="${onnx%.onnx}.mxr"