Skip to content

Commit 3e839ba

Browse files
committed
Add sycl device to cli
1 parent c179ec6 commit 3e839ba

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

dpbench/console/_namespace.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Namespace(argparse.Namespace):
1515
implementations: set[str]
1616
all_implementations: bool
1717
preset: str
18+
sycl_device: str
1819
dpbench: bool
1920
npbench: bool
2021
polybench: bool

dpbench/console/run.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ def add_run_arguments(parser: argparse.ArgumentParser):
8787
default=True,
8888
help="Either to save execution into database.",
8989
)
90+
parser.add_argument(
91+
"--sycl-device",
92+
type=str,
93+
nargs="?",
94+
default=None,
95+
help="Sycl device to overwrite for framework configurations.",
96+
)
9097

9198

9299
def execute_run(args: Namespace, conn: sqlalchemy.Engine):
@@ -110,6 +117,10 @@ def execute_run(args: Namespace, conn: sqlalchemy.Engine):
110117
with_polybench=args.polybench,
111118
)
112119

120+
if args.sycl_device:
121+
for framework in cfg.GLOBAL.frameworks:
122+
framework.sycl_device = args.sycl_device
123+
113124
if args.run_id is None:
114125
args.run_id = dpbi.create_run(conn)
115126

0 commit comments

Comments
 (0)