Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Side by Side Diff: tools/nanobench_flags.py

Issue 1036223002: Update [dm|nanobench]_flags for CPU/GPU split (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/nanobench_flags.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #
2 # Copyright 2015 Google Inc.
3 #
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6 #
7
1 #!/usr/bin/env python 8 #!/usr/bin/env python
2 9
3 usage = ''' 10 usage = '''
4 Write extra flags to outfile for nanobench based on the bot name: 11 Write extra flags to outfile for nanobench based on the bot name:
5 $ python nanobench_flags.py outfile Perf-Android-GalaxyS3-Mali400-Arm7-Release 12 $ python nanobench_flags.py outfile Perf-Android-GCC-GalaxyS3-GPU-Mali400-Arm7 -Release
6 Or run self-tests: 13 Or run self-tests:
7 $ python nanobench_flags.py test 14 $ python nanobench_flags.py test
8 ''' 15 '''
9 16
10 import inspect 17 import inspect
11 import json 18 import json
12 import os 19 import os
13 import sys 20 import sys
14 21
15 22
(...skipping 17 matching lines...) Expand all
33 config.extend(['msaa4', 'nvprmsaa4']) 40 config.extend(['msaa4', 'nvprmsaa4'])
34 else: 41 else:
35 config.extend(['msaa16', 'nvprmsaa16']) 42 config.extend(['msaa16', 'nvprmsaa16'])
36 args.append('--config') 43 args.append('--config')
37 args.extend(config) 44 args.extend(config)
38 45
39 if 'Valgrind' in bot: 46 if 'Valgrind' in bot:
40 # Don't care about Valgrind performance. 47 # Don't care about Valgrind performance.
41 args.extend(['--loops', '1']) 48 args.extend(['--loops', '1'])
42 args.extend(['--samples', '1']) 49 args.extend(['--samples', '1'])
43 if 'Valgrind_GPU' in bot:
44 args.append('--nocpu')
45 elif 'Valgrind_CPU' in bot:
46 args.append('--nogpu')
47 50
48 if 'HD2000' in bot: 51 if 'HD2000' in bot:
49 args.extend(['--benchTileW', '256']) 52 args.extend(['--benchTileW', '256'])
50 args.extend(['--benchTileH', '256']) 53 args.extend(['--benchTileH', '256'])
51 54
52 match = [] 55 match = []
53 if 'Android' in bot: 56 if 'Android' in bot:
54 # Segfaults when run as GPU bench. Very large texture? 57 # Segfaults when run as GPU bench. Very large texture?
55 match.append('~blurroundrect') 58 match.append('~blurroundrect')
56 match.append('~patch_grid') # skia:2847 59 match.append('~patch_grid') # skia:2847
57 match.append('~desk_carsvg') 60 match.append('~desk_carsvg')
58 if 'HD2000' in bot: 61 if 'HD2000' in bot:
59 match.extend(['~gradient', '~etc1bitmap']) # skia:2895 62 match.extend(['~gradient', '~etc1bitmap']) # skia:2895
60 if 'Nexus7' in bot: 63 if 'Nexus7' in bot:
61 match = ['skp'] # skia:2774 64 match = ['skp'] # skia:2774
62 if match: 65 if match:
63 args.append('--match') 66 args.append('--match')
64 args.extend(match) 67 args.extend(match)
65 68
66
67 if ('GalaxyS3' in bot or
68 'GalaxyS4' in bot):
69 args.append('--nocpu')
70 return args 69 return args
71 cov_end = lineno() # Don't care about code coverage past here. 70 cov_end = lineno() # Don't care about code coverage past here.
72 71
73 72
74 def self_test(): 73 def self_test():
75 import coverage # This way the bots don't need coverage.py to be installed. 74 import coverage # This way the bots don't need coverage.py to be installed.
76 args = {} 75 args = {}
77 cases = [ 76 cases = [
78 'Perf-Android-GalaxyS3-Mali400-Arm7-Release',
79 'Perf-Android-Nexus7-Tegra3-Arm7-Release', 77 'Perf-Android-Nexus7-Tegra3-Arm7-Release',
80 'Test-Ubuntu14-GCE-NoGPU-x86_64-Release-Valgrind_CPU', 78 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
81 'Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind_GPU', 79 'Test-Win7-MSVC-ShuttleA-GPU-HD2000-x86-Debug-ANGLE',
82 'Test-Win7-ShuttleA-HD2000-x86-Debug-ANGLE',
83 ] 80 ]
84 81
85 cov = coverage.coverage() 82 cov = coverage.coverage()
86 cov.start() 83 cov.start()
87 for case in cases: 84 for case in cases:
88 args[case] = get_args(case) 85 args[case] = get_args(case)
89 cov.stop() 86 cov.stop()
90 87
91 this_file = os.path.basename(__file__) 88 this_file = os.path.basename(__file__)
92 _, _, not_run, _ = cov.analysis(this_file) 89 _, _, not_run, _ = cov.analysis(this_file)
(...skipping 11 matching lines...) Expand all
104 if len(sys.argv) == 2 and sys.argv[1] == 'test': 101 if len(sys.argv) == 2 and sys.argv[1] == 'test':
105 self_test() 102 self_test()
106 sys.exit(0) 103 sys.exit(0)
107 104
108 if len(sys.argv) != 3: 105 if len(sys.argv) != 3:
109 print usage 106 print usage
110 sys.exit(1) 107 sys.exit(1)
111 108
112 with open(sys.argv[1], 'w') as out: 109 with open(sys.argv[1], 'w') as out:
113 json.dump(get_args(sys.argv[2]), out) 110 json.dump(get_args(sys.argv[2]), out)
OLDNEW
« no previous file with comments | « tools/nanobench_flags.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698