Commit 47023d28 authored by rmistry's avatar rmistry Committed by Commit bot

[Skia] Add support for both CPU and GPU nanobench runs

BUG=skia:5398
# For minor change to ct_skps.isolate
TBR=maruel
NOTRY=true

Review-Url: https://codereview.chromium.org/2048623002
Cr-Commit-Position: refs/heads/master@{#398280}
parent 2e304ec9
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
'--git_hash', '<(GIT_HASH)', '--git_hash', '<(GIT_HASH)',
'--isolated_outdir', '${ISOLATED_OUTDIR}', '--isolated_outdir', '${ISOLATED_OUTDIR}',
'--configuration', '<(CONFIGURATION)', '--configuration', '<(CONFIGURATION)',
'--builder', '<(BUILDER)',
], ],
}, },
}], }],
......
...@@ -33,6 +33,8 @@ def main(): ...@@ -33,6 +33,8 @@ def main():
parser.add_argument('-i', '--isolated_outdir', required=True, parser.add_argument('-i', '--isolated_outdir', required=True,
help='Swarming will automatically upload to ' help='Swarming will automatically upload to '
'isolateserver all artifacts in this dir.') 'isolateserver all artifacts in this dir.')
parser.add_argument('-b', '--builder', required=True,
help='The name of the builder.')
args = parser.parse_args() args = parser.parse_args()
tool_path = os.path.join(SKIA_SRC_DIR, 'out', args.configuration, args.tool) tool_path = os.path.join(SKIA_SRC_DIR, 'out', args.configuration, args.tool)
...@@ -51,18 +53,30 @@ def main(): ...@@ -51,18 +53,30 @@ def main():
]) ])
elif args.tool == 'nanobench': elif args.tool == 'nanobench':
# Add Nanobench specific arguments. # Add Nanobench specific arguments.
config = '8888'
cpu_or_gpu = 'CPU'
cpu_or_gpu_value = 'AVX2'
if 'GPU' in args.builder:
config = 'gpu'
cpu_or_gpu = 'GPU'
cpu_or_gpu_value = 'GT610'
out_results_file = os.path.join( out_results_file = os.path.join(
args.isolated_outdir, 'nanobench_%s_slave%d.json' % (args.git_hash, args.isolated_outdir, 'nanobench_%s_%s_slave%d.json' % (
args.slave_num)) args.git_hash, config, args.slave_num))
cmd.extend([ cmd.extend([
'--skps', skps_dir, '--skps', skps_dir,
'--match', 'skp', '--match', 'skp',
'--resourcePath', resource_path, '--resourcePath', resource_path,
'--config', '8888', 'gpu', '--config', config,
'--outResultsFile', out_results_file, '--outResultsFile', out_results_file,
'--properties', 'gitHash', args.git_hash, '--properties', 'gitHash', args.git_hash,
'--key', 'arch', 'x86_64', 'compiler', 'GCC', 'cpu_or_gpu', 'CPU', '--key', 'arch', 'x86_64',
'cpu_or_gpu_value', 'AVX2', 'model', 'SWARM', 'os', 'Ubuntu', 'compiler', 'GCC',
'cpu_or_gpu', cpu_or_gpu,
'cpu_or_gpu_value', cpu_or_gpu_value,
'model', 'SWARM',
'os', 'Ubuntu',
'--verbose', '--verbose',
]) ])
elif args.tool == 'get_images_from_skps': elif args.tool == 'get_images_from_skps':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment