Skip MNN export for Raspberry Pi and NVIDIA Jetson (#17292)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
1e70710f3e
commit
daaac35fff
2 changed files with 4 additions and 0 deletions
|
|
@ -193,6 +193,7 @@ def test_export_paddle():
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.slow
|
@pytest.mark.slow
|
||||||
|
@pytest.mark.skipif(IS_RASPBERRYPI, reason="MNN not supported on Raspberry Pi")
|
||||||
def test_export_mnn():
|
def test_export_mnn():
|
||||||
"""Test YOLO exports to MNN format (WARNING: MNN test must precede NCNN test or CI error on Windows)."""
|
"""Test YOLO exports to MNN format (WARNING: MNN test must precede NCNN test or CI error on Windows)."""
|
||||||
file = YOLO(MODEL).export(format="mnn", imgsz=32)
|
file = YOLO(MODEL).export(format="mnn", imgsz=32)
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ from ultralytics.utils import (
|
||||||
ARM64,
|
ARM64,
|
||||||
DEFAULT_CFG,
|
DEFAULT_CFG,
|
||||||
IS_JETSON,
|
IS_JETSON,
|
||||||
|
IS_RASPBERRYPI,
|
||||||
LINUX,
|
LINUX,
|
||||||
LOGGER,
|
LOGGER,
|
||||||
MACOS,
|
MACOS,
|
||||||
|
|
@ -244,6 +245,8 @@ class Exporter:
|
||||||
"WARNING ⚠️ INT8 export requires a missing 'data' arg for calibration. "
|
"WARNING ⚠️ INT8 export requires a missing 'data' arg for calibration. "
|
||||||
f"Using default 'data={self.args.data}'."
|
f"Using default 'data={self.args.data}'."
|
||||||
)
|
)
|
||||||
|
if mnn and (IS_RASPBERRYPI or IS_JETSON):
|
||||||
|
raise SystemError("MNN export not supported on Raspberry Pi and NVIDIA Jetson")
|
||||||
# Input
|
# Input
|
||||||
im = torch.zeros(self.args.batch, 3, *self.imgsz).to(self.device)
|
im = torch.zeros(self.args.batch, 3, *self.imgsz).to(self.device)
|
||||||
file = Path(
|
file = Path(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue