From e1adef7a1df1a198b026fcd3404c9315f465ea9b Mon Sep 17 00:00:00 2001 From: Laughing <61612323+Laughing-q@users.noreply.github.com> Date: Mon, 25 Nov 2024 23:46:14 +0800 Subject: [PATCH] Fix DLA export (#17765) Co-authored-by: UltralyticsAssistant Co-authored-by: Lakshantha Dissanayake Co-authored-by: Glenn Jocher --- ultralytics/engine/exporter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ultralytics/engine/exporter.py b/ultralytics/engine/exporter.py index f24e792941..c0e29e7e1c 100644 --- a/ultralytics/engine/exporter.py +++ b/ultralytics/engine/exporter.py @@ -220,6 +220,7 @@ class Exporter: self.args.device = "0" if fmt == "engine" and "dla" in str(self.args.device): # convert int/list to str first dla = self.args.device.split(":")[-1] + self.args.device = "0" # update device to "0" assert dla in {"0", "1"}, f"Expected self.args.device='dla:0' or 'dla:1, but got {self.args.device}." self.device = select_device("cpu" if self.args.device is None else self.args.device)