Add perf json for simd.js benchmarks.
authorbradnelson <bradnelson@google.com>
Wed, 20 May 2015 13:09:06 +0000 (06:09 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 20 May 2015 13:08:47 +0000 (13:08 +0000)
Using a script to generate the somewhat redundant json.

BUG=v8:4124
LOG=N
R=machenbach@chromium.org,bbudge@chromium.org
TEST=None

Review URL: https://codereview.chromium.org/1146073002

Cr-Commit-Position: refs/heads/master@{#28514}

test/simdjs/SimdJs.json [new file with mode: 0644]
test/simdjs/generate.py [new file with mode: 0755]

diff --git a/test/simdjs/SimdJs.json b/test/simdjs/SimdJs.json
new file mode 100644 (file)
index 0000000..e6686b9
--- /dev/null
@@ -0,0 +1,444 @@
+{
+  "flags": [
+    "--harmony-object",
+    "test/simdjs/harness-adapt.js"
+  ],
+  "name": "SIMDJS",
+  "path": [
+    "../../"
+  ],
+  "resources": [
+    "test/simdjs/data/src/benchmarks/base.js",
+    "test/simdjs/data/src/ecmascript_simd.js",
+    "test/simdjs/data/src/benchmarks/kernel-template.js",
+    "test/simdjs/data/src/benchmarks/averageFloat32x4.js",
+    "test/simdjs/data/src/benchmarks/averageFloat32x4LoadFromInt8Array.js",
+    "test/simdjs/data/src/benchmarks/averageFloat32x4LoadX.js",
+    "test/simdjs/data/src/benchmarks/averageFloat32x4LoadXY.js",
+    "test/simdjs/data/src/benchmarks/averageFloat32x4LoadXYZ.js",
+    "test/simdjs/data/src/benchmarks/averageFloat64x2.js",
+    "test/simdjs/data/src/benchmarks/averageFloat64x2Load.js",
+    "test/simdjs/data/src/benchmarks/mandelbrot.js",
+    "test/simdjs/data/src/benchmarks/matrix-multiplication.js",
+    "test/simdjs/data/src/benchmarks/transform.js",
+    "test/simdjs/data/src/benchmarks/shiftrows.js",
+    "test/simdjs/data/src/benchmarks/transpose4x4.js",
+    "test/simdjs/data/src/benchmarks/inverse4x4.js",
+    "test/simdjs/data/src/benchmarks/sinx4.js",
+    "test/simdjs/data/src/benchmarks/memset.js",
+    "test/simdjs/data/src/benchmarks/memcpy.js"
+  ],
+  "run_count": 5,
+  "tests": [
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/kernel-template.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "kernel-template",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/averageFloat32x4.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "averageFloat32x4",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/averageFloat32x4LoadFromInt8Array.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "averageFloat32x4LoadFromInt8Array",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/averageFloat32x4LoadX.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "averageFloat32x4LoadX",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/averageFloat32x4LoadXY.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "averageFloat32x4LoadXY",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/averageFloat32x4LoadXYZ.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "averageFloat32x4LoadXYZ",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/averageFloat64x2.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "averageFloat64x2",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/averageFloat64x2Load.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "averageFloat64x2Load",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/mandelbrot.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "mandelbrot",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/matrix-multiplication.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "matrix-multiplication",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/transform.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "transform",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/shiftrows.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "shiftrows",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/transpose4x4.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "transpose4x4",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/inverse4x4.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "inverse4x4",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/sinx4.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "sinx4",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/memset.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "memset",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    },
+    {
+      "flags": [
+        "test/simdjs/data/src/benchmarks/memcpy.js"
+      ],
+      "main": "test/simdjs/harness-finish.js",
+      "name": "memcpy",
+      "results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
+      "tests": [
+        {
+          "name": "SIMD"
+        },
+        {
+          "name": "Non-SIMD"
+        },
+        {
+          "name": "Speedup",
+          "units": "score"
+        },
+        {
+          "name": "Iterations",
+          "units": "count"
+        }
+      ]
+    }
+  ],
+  "total": true,
+  "units": "ms"
+}
\ No newline at end of file
diff --git a/test/simdjs/generate.py b/test/simdjs/generate.py
new file mode 100755 (executable)
index 0000000..9dc41cf
--- /dev/null
@@ -0,0 +1,56 @@
+#!/usr/bin/python
+# Copyright 2015 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Script to re-generate SimdJs.json from a SimdJs.json.template.
+
+import json
+import os
+import re
+
+SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
+
+SKIP_FILES = [
+    '../ecmascript_simd',
+    'base',
+    # TODO(bradnelson): Drop these when tests are fixed upstream.
+    'aobench',
+    'averageFloat32x4Load',
+    'matrix-multiplication-load',
+]
+
+run_js = open(
+    os.path.join(SCRIPT_DIR, 'data', 'src', 'benchmarks', 'run.js')).read()
+tests = re.findall("load \\(\\'([^']+)[.]js\\'\\)", run_js)
+tests = [t for t in tests if t not in SKIP_FILES]
+
+output = {
+  'name': 'SIMDJS',
+  'run_count': 5,
+  'units': 'ms',
+  'total': True,
+  'resources': [
+    'test/simdjs/data/src/benchmarks/base.js',
+    'test/simdjs/data/src/ecmascript_simd.js'
+  ] + ['test/simdjs/data/src/benchmarks/%s.js' % t for t in tests],
+  'flags': ['--harmony-object', 'test/simdjs/harness-adapt.js'],
+  'path': ['../../'],
+  'tests': [
+    {
+      'name': test,
+      'main': 'test/simdjs/harness-finish.js',
+      'flags': ['test/simdjs/data/src/benchmarks/%s.js' % test],
+      'results_regexp': '%s\\([ ]*([0-9.]+)(ms)?\\)',
+      'tests': [
+        {'name': 'SIMD'},
+        {'name': 'Non-SIMD'},
+        {'name': 'Speedup', 'units': 'score'},
+        {'name': 'Iterations', 'units': 'count'}
+      ]
+    }
+  for test in tests],
+}
+
+with open(os.path.join(SCRIPT_DIR, 'SimdJS.json'), 'w') as fh:
+  fh.write(json.dumps(output, separators=(',',': '), indent=2, sort_keys=True))