skia2/modules/canvaskit/wasm_tools/SIMD/simd_test.sh
Elliot Evans d511d9a086 Add Puppeteer perf for release and experimental_simd builds of CanvasKit against SKPs
Adds the command:
  make skps_release_and_SIMD
for perfing builds against a set of SKPs in ~/skps for release and
simd builds of CanvasKit. Also outputs a summary of the perf results
in a table format.

See the document "SIMD CanvasKit Build Performance Testing"
for more details:
https://docs.google.com/document/d/114kdSGPMnOSQCZ7pFgd3MGMn5mIW562RMoXVmD13e0M/edit#

Bug: skia:10453
Change-Id: I311629a1420301dda41f7ec57ce1403b05fd949b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301982
Reviewed-by: Elliot Evans <elliotevans@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-07-16 17:47:08 +00:00

27 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Copyright 2020 Google LLC
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This script takes a path to a .wasm file as input and outputs textual representations of all wasm
# SIMD operations present in the .wasm file.
#
# Example usage: ./simd_test.sh simd_float_capabilities.wasm
# Requires that emscripten and wasm2wat are added to your PATH.
# Requires, and is verified to work with
# - The output of `wasm2wat --version` should be `1.0.13 (1.0.17)`
# - install from here: https://github.com/WebAssembly/wabt
wasm2wat --enable-simd $1 > output/simd_test.wat
# The following lines output all SIMD operations produced in the output WASM.
# Useful for checking that SIMD instructions are actually being used.
# e.g. for the following C++ code:
# auto vec1 = skvx::Vec<2, double>({11.f, -22.f}) + skvx::Vec<2, double>({13.f, -1.f});
# it is expected that the f64x2.add operation is present in the output WASM.
echo "The following WASM SIMD operations were used in the compiled code:"
grep -f wasm_simd_types.txt output/simd_test.wat