[Detector Support]: Issue setting up accelerated detection with rocm #21890
-
Describe the problem you are havingFrigate is working when using CPU. I cant seem to setup hardware accelerated detection Version0.16.4-4131252 Frigate config filedetectors:
onnx:
type: onnx
model:
model_type: yolo-generic
width: 640
height: 640
input_tensor: nchw
input_dtype: float
path: /config/model_cache/yolox_s.onnxdocker-compose file or Docker CLI commandservices:
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
stop_grace_period: 30s # allow enough time to shut down the various services
image: ghcr.io/blakeblackshear/frigate:stable-rocm
shm_size: "4gb" # update for your cameras based on calculation above
devices:
#- /dev/bus/usb:/dev/bus/usb # Passes the USB Coral, needs to be modified for other versions
#- /dev/apex_0:/dev/apex_0 # Passes a PCIe Coral, follow driver instructions here https://github.com/jnicolson/gasket-builder
#- /dev/video11:/dev/video11 # For Raspberry Pi 4B
#- /dev/dri/renderD128:/dev/dri/renderD128 # For intel hwaccel, needs to be updated for your hardware
- /dev/dri:/dev/dri
- /dev/kfd:/dev/kfd
volumes:
- /etc/localtime:/etc/localtime:ro
- /config:/config
- /media/frigate:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "8971:8971"
- "5000:5000" # Internal unauthenticated access. Expose carefully.
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
environment:
FRIGATE_RTSP_PASSWORD: "x"
HSA_OVERRIDE_GFX_VERSION: "11.0.2"
LIBVA_DRIVER_NAME: "radeonsi"Relevant Frigate log outputfrigate | 2026-02-05 17:16:10.157487849 [2026-02-05 17:16:10] frigate.app INFO : Starting Frigate (0.16.4-4131252)
frigate | 2026-02-05 17:16:10.160160329 [2026-02-05 17:16:10] peewee_migrate.logs INFO : Starting migrations
frigate | 2026-02-05 17:16:10.160603694 [2026-02-05 17:16:10] peewee_migrate.logs INFO : There is nothing to migrate
frigate | 2026-02-05 17:16:10.171484590 [2026-02-05 17:16:10] frigate.app INFO : Recording process started: 503
frigate | 2026-02-05 17:16:10.171673351 [2026-02-05 17:16:10] frigate.app INFO : Review process started: 515
frigate | 2026-02-05 17:16:10.172971406 [2026-02-05 17:16:10] frigate.app INFO : go2rtc process pid: 119
frigate | 2026-02-05 17:16:10.183953901 [2026-02-05 17:16:10] detector.onnx INFO : Starting detection process: 528
frigate | 2026-02-05 17:16:10.186721468 [2026-02-05 17:16:10] frigate.detectors.plugins.onnx INFO : ONNX: loaded onnxruntime module
frigate | 2026-02-05 17:16:10.187738811 [2026-02-05 17:16:10] frigate.detectors.plugins.onnx INFO : ONNX: loading /config/model_cache/yolox_s.onnx
frigate | 2026-02-05 17:16:10.187855648 [2026-02-05 17:16:10] frigate.app INFO : Embedding process started: 531
frigate | 2026-02-05 17:16:10.197977212 [2026-02-05 17:16:10] frigate.app INFO : Output process started: 559
frigate | 2026-02-05 17:16:10.210969946 [2026-02-05 17:16:10] frigate.app INFO : Camera processor started for Undercover: 580
frigate | 2026-02-05 17:16:10.218887952 [2026-02-05 17:16:10] frigate.app INFO : Camera processor started for Inside: 587
frigate | 2026-02-05 17:16:10.226555283 [2026-02-05 17:16:10] frigate.app INFO : Capture process started for Undercover: 612
frigate | 2026-02-05 17:16:10.261840545 [2026-02-05 17:16:10] frigate.app INFO : Capture process started for Inside: 634
frigate | 2026-02-05 17:16:10.388933134 [2026-02-05 17:16:10] frigate.api.fastapi_app INFO : Starting FastAPI app
frigate | 2026-02-05 17:16:10.534106839 [2026-02-05 17:16:10] frigate.api.fastapi_app INFO : FastAPI started
frigate | 2026-02-05 17:16:10.980409797 loading data from : /config/model_cache/facedet/landmarkdet.yaml
frigate | 2026-02-05 17:16:11.133281098 [INFO] Starting go2rtc healthcheck service...
frigate | 2026-02-05 17:16:11.268507692 INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
frigate | 2026-02-05 17:16:11.760488477 Memory access fault by GPU node-1 (Agent handle: 0x2801cc30) on address 0x7f3acde84000. Reason: Page not present or supervisor privilege.
frigate | 2026-02-05 17:16:11.760494207 Fatal Python error: Aborted
frigate | 2026-02-05 17:16:11.760496662
frigate | 2026-02-05 17:16:11.760498205 Thread 0x00007f3ad4ee3040 (most recent call first):
frigate | 2026-02-05 17:16:11.760522490 File "/usr/local/lib/python3.11/dist-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 537 in _create_inference_session
frigate | 2026-02-05 17:16:11.760524313 File "/usr/local/lib/python3.11/dist-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 465 in __init__
frigate | 2026-02-05 17:16:11.760525576 File "/opt/frigate/frigate/detectors/plugins/onnx.py", line 53 in __init__
frigate | 2026-02-05 17:16:11.760567994 File "/opt/frigate/frigate/detectors/__init__.py", line 18 in create_detector
frigate | 2026-02-05 17:16:11.760570189 File "/opt/frigate/frigate/object_detection/base.py", line 57 in __init__
frigate | 2026-02-05 17:16:11.760572102 File "/opt/frigate/frigate/object_detection/base.py", line 112 in run_detector
frigate | 2026-02-05 17:16:11.760573946 File "/usr/lib/python3.11/multiprocessing/process.py", line 108 in run
frigate | 2026-02-05 17:16:11.760575749 File "/opt/frigate/frigate/util/process.py", line 41 in run_wrapper
frigate | 2026-02-05 17:16:11.760578063 File "/usr/lib/python3.11/multiprocessing/process.py", line 314 in _bootstrap
frigate | 2026-02-05 17:16:11.760598141 File "/usr/lib/python3.11/multiprocessing/popen_fork.py", line 71 in _launch
frigate | 2026-02-05 17:16:11.760599483 File "/usr/lib/python3.11/multiprocessing/popen_fork.py", line 19 in __init__
frigate | 2026-02-05 17:16:11.760600846 File "/usr/lib/python3.11/multiprocessing/context.py", line 281 in _Popen
frigate | 2026-02-05 17:16:11.760610544 File "/usr/lib/python3.11/multiprocessing/context.py", line 224 in _Popen
frigate | 2026-02-05 17:16:11.760611826 File "/usr/lib/python3.11/multiprocessing/process.py", line 121 in start
frigate | 2026-02-05 17:16:11.760625862 File "/opt/frigate/frigate/util/process.py", line 30 in start
frigate | 2026-02-05 17:16:11.760635039 File "/opt/frigate/frigate/object_detection/base.py", line 195 in start_or_restart
frigate | 2026-02-05 17:16:11.760636382 File "/opt/frigate/frigate/object_detection/base.py", line 163 in __init__
frigate | 2026-02-05 17:16:11.760644847 File "/opt/frigate/frigate/app.py", line 391 in start_detectors
frigate | 2026-02-05 17:16:11.760655998 File "/opt/frigate/frigate/app.py", line 648 in start
frigate | 2026-02-05 17:16:11.760667760 File "/opt/frigate/frigate/__main__.py", line 104 in main
frigate | 2026-02-05 17:16:11.760678831 File "/opt/frigate/frigate/__main__.py", line 108 in <module>
frigate | 2026-02-05 17:16:11.760689921 File "<frozen runpy>", line 88 in _run_code
frigate | 2026-02-05 17:16:11.760698407 File "<frozen runpy>", line 198 in _run_module_as_main
frigate | 2026-02-05 17:16:11.760827667Install methodDocker Compose Object DetectorOther Screenshots of the Frigate UI's System metrics pagesn/a Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
|
The error you're encountering ( For AMD GPUs with ROCm, you need to configure the Try changing your environment variable from environment:
FRIGATE_RTSP_PASSWORD: "x"
HSA_OVERRIDE_GFX_VERSION: "11.0.0"
LIBVA_DRIVER_NAME: "radeonsi"You should also verify ROCm is working properly by running To check if ROCm found your GPU: To verify your GPU chipset version: Important note about AMD integrated GPUs: AMD/ROCm does not officially support integrated GPUs, though they often work with the proper If issues persist after setting 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
I tried increasing the UMA to 8GB, this didnt make any difference to the problem I tried adding the module option amdgpu.cwsr_enable=0 Apparently they have included support for gfx1103 in v7.1 How are other people managing to run frigate with 780m? |
Beta Was this translation helpful? Give feedback.
-
|
I found the solution Do not install amdgpu-dkms. Now I have 780m rocm and hailo-8 |
Beta Was this translation helpful? Give feedback.
-
|
I also update my amdgpu-dkms driver from 30.1 to 30.3 and now Frigate simply crashes :( |
Beta Was this translation helpful? Give feedback.
I found the solution
Do not install amdgpu-dkms.
Now I have 780m rocm and hailo-8