mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-09-26 19:41:29 +08:00
Fix cuda graph fallback (#20039)
This commit is contained in:
@@ -143,9 +143,10 @@ class ONNXDetector(DetectionApi):
|
|||||||
try:
|
try:
|
||||||
# Run using CUDA graphs if available
|
# Run using CUDA graphs if available
|
||||||
tensor_output = self._cg_runner.run(model_input_name, tensor_input)
|
tensor_output = self._cg_runner.run(model_input_name, tensor_input)
|
||||||
except Exception:
|
except Exception as e:
|
||||||
logger.warning("CUDA Graphs failed, falling back to regular run")
|
logger.warning(f"CUDA Graphs failed, falling back to regular run: {e}")
|
||||||
self._cg_runner = None
|
self._cg_runner = None
|
||||||
|
tensor_output = self.model.run(None, {model_input_name: tensor_input})
|
||||||
else:
|
else:
|
||||||
# Use regular run if CUDA graphs are not available
|
# Use regular run if CUDA graphs are not available
|
||||||
tensor_output = self.model.run(None, {model_input_name: tensor_input})
|
tensor_output = self.model.run(None, {model_input_name: tensor_input})
|
||||||
|
Reference in New Issue
Block a user