Skip to content

Commit

Permalink
Handle empty input_files / output_files
Browse files Browse the repository at this point in the history
Summary:
We may not always want to provide explicit input / output files; in this case, we shouldn't
specify --input or --output args when running the benchmark application.

Reviewed By: sxu

Differential Revision: D22024466

fbshipit-source-id: 3da390c16e038442a8c223dadc0ac7cb5a98f098
  • Loading branch information
kevinbchen authored and facebook-github-bot committed Jun 12, 2020
1 parent 5122a95 commit 0295286
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions benchmarking/frameworks/oculus/oculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,11 @@ def verifyBenchmarkFile(self, benchmark, filename, is_post):
def _composeRunCommand(self, env_vars, program, platform,
test, inputs, outputs):
cmd = [env_vars, program,
"--json", platform.getOutputDir() + "report.json",
"--input", ' ' .join(inputs),
"--output", ' '.join(outputs)]
"--json", platform.getOutputDir() + "report.json"]
if len(inputs) > 0:
cmd.extend(["--input", ' ' .join(inputs)])
if len(outputs) > 0:
cmd.extend(["--output", ' '.join(outputs)])
if "commands" in test:
if "oculus" in test["commands"]:
for key in test["commands"]["oculus"]:
Expand Down

0 comments on commit 0295286

Please sign in to comment.