Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions backends/arm/test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class arm_test_options(Enum):
corstone300 = auto()
dump_path = auto()
date_format = auto()
fast_fvp = auto()


_test_options: dict[arm_test_options, Any] = {}
Expand All @@ -41,6 +42,7 @@ def pytest_addoption(parser):
parser.addoption("--arm_run_corstone300", action="store_true")
parser.addoption("--default_dump_path", default=None)
parser.addoption("--date_format", default="%d-%b-%H:%M:%S")
parser.addoption("--fast_fvp", action="store_true")


def pytest_configure(config):
Expand All @@ -63,6 +65,7 @@ def pytest_configure(config):
f"Supplied argument 'default_dump_path={dump_path}' that does not exist or is not a directory."
)
_test_options[arm_test_options.date_format] = config.option.date_format
_test_options[arm_test_options.fast_fvp] = config.option.fast_fvp
logging.basicConfig(level=logging.INFO, stream=sys.stdout)


Expand Down
12 changes: 12 additions & 0 deletions backends/arm/test/runner_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import numpy as np
import torch

from executorch.backends.arm.test.common import arm_test_options, is_option_enabled

from torch.export import ExportedProgram
from torch.fx.node import Node

Expand Down Expand Up @@ -249,6 +251,10 @@ def run_corstone(
for input_path in input_paths:
cmd_line += f" -i {input_path}"

ethos_u_extra_args = ""
if is_option_enabled(arm_test_options.fast_fvp):
ethos_u_extra_args = ethos_u_extra_args + "--fast"

command_args = {
"corstone-300": [
"FVP_Corstone_SSE-300_Ethos-U55",
Expand All @@ -267,6 +273,8 @@ def run_corstone(
"-C",
"cpu0.semihosting-stack_base=0",
"-C",
f"ethosu.extra_args='{ethos_u_extra_args}'",
"-C",
"cpu0.semihosting-heap_limit=0",
"-C",
f"cpu0.semihosting-cmd_line='{cmd_line}'",
Expand All @@ -282,6 +290,8 @@ def run_corstone(
"-C",
"mps4_board.visualisation.disable-visualisation=1",
"-C",
"vis_hdlcd.disable_visualisation=1",
"-C",
"mps4_board.telnetterminal0.start_telnet=0",
"-C",
"mps4_board.uart0.out_file='-'",
Expand All @@ -296,6 +306,8 @@ def run_corstone(
"-C",
"mps4_board.subsystem.cpu0.semihosting-heap_limit=0",
"-C",
f"mps4_board.subsystem.ethosu.extra_args='{ethos_u_extra_args}'",
"-C",
f"mps4_board.subsystem.cpu0.semihosting-cmd_line='{cmd_line}'",
"-a",
elf_path,
Expand Down
Loading