1#!/bin/sh 2# Copyright 2021 Google LLC 3# 4# This source code is licensed under the BSD-style license found in the 5# LICENSE file in the root directory of this source tree. 6 7################################## ARM NEON ################################### 8tools/xngen src/f32-qs8-vcvt/neon.c.in -D BATCH_TILE=8 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-neon-x8.c & 9tools/xngen src/f32-qs8-vcvt/neon.c.in -D BATCH_TILE=16 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-neon-x16.c & 10tools/xngen src/f32-qs8-vcvt/neon.c.in -D BATCH_TILE=24 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-neon-x24.c & 11tools/xngen src/f32-qs8-vcvt/neon.c.in -D BATCH_TILE=32 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-neon-x32.c & 12 13tools/xngen src/f32-qs8-vcvt/neon.c.in -D BATCH_TILE=8 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-neon-x8.c & 14tools/xngen src/f32-qs8-vcvt/neon.c.in -D BATCH_TILE=16 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-neon-x16.c & 15tools/xngen src/f32-qs8-vcvt/neon.c.in -D BATCH_TILE=24 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-neon-x24.c & 16tools/xngen src/f32-qs8-vcvt/neon.c.in -D BATCH_TILE=32 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-neon-x32.c & 17 18tools/xngen src/f32-qs8-vcvt/neonv8.c.in -D BATCH_TILE=8 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-neonv8-x8.c & 19tools/xngen src/f32-qs8-vcvt/neonv8.c.in -D BATCH_TILE=16 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-neonv8-x16.c & 20tools/xngen src/f32-qs8-vcvt/neonv8.c.in -D BATCH_TILE=24 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-neonv8-x24.c & 21tools/xngen src/f32-qs8-vcvt/neonv8.c.in -D BATCH_TILE=32 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-neonv8-x32.c & 22 23tools/xngen src/f32-qs8-vcvt/neonv8.c.in -D BATCH_TILE=8 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-neonv8-x8.c & 24tools/xngen src/f32-qs8-vcvt/neonv8.c.in -D BATCH_TILE=16 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-neonv8-x16.c & 25tools/xngen src/f32-qs8-vcvt/neonv8.c.in -D BATCH_TILE=24 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-neonv8-x24.c & 26tools/xngen src/f32-qs8-vcvt/neonv8.c.in -D BATCH_TILE=32 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-neonv8-x32.c & 27 28################################# x86 128-bit ################################# 29tools/xngen src/f32-qs8-vcvt/sse.c.in -D SSE=2 -D BATCH_TILE=8 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-sse2-x8.c & 30tools/xngen src/f32-qs8-vcvt/sse.c.in -D SSE=2 -D BATCH_TILE=16 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-sse2-x16.c & 31tools/xngen src/f32-qs8-vcvt/sse.c.in -D SSE=2 -D BATCH_TILE=24 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-sse2-x24.c & 32tools/xngen src/f32-qs8-vcvt/sse.c.in -D SSE=2 -D BATCH_TILE=32 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-sse2-x32.c & 33 34tools/xngen src/f32-qs8-vcvt/sse.c.in -D SSE=4 -D BATCH_TILE=8 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-sse41-x8.c & 35tools/xngen src/f32-qs8-vcvt/sse.c.in -D SSE=4 -D BATCH_TILE=16 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-sse41-x16.c & 36tools/xngen src/f32-qs8-vcvt/sse.c.in -D SSE=4 -D BATCH_TILE=24 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-sse41-x24.c & 37tools/xngen src/f32-qs8-vcvt/sse.c.in -D SSE=4 -D BATCH_TILE=32 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-sse41-x32.c & 38 39tools/xngen src/f32-qs8-vcvt/sse.c.in -D SSE=2 -D BATCH_TILE=8 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-sse2-x8.c & 40tools/xngen src/f32-qs8-vcvt/sse.c.in -D SSE=2 -D BATCH_TILE=16 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-sse2-x16.c & 41tools/xngen src/f32-qs8-vcvt/sse.c.in -D SSE=2 -D BATCH_TILE=24 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-sse2-x24.c & 42tools/xngen src/f32-qs8-vcvt/sse.c.in -D SSE=2 -D BATCH_TILE=32 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-sse2-x32.c & 43 44################################# x86 256-bit ################################# 45tools/xngen src/f32-qs8-vcvt/avx.c.in -D BATCH_TILE=8 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-avx-x8.c & 46tools/xngen src/f32-qs8-vcvt/avx.c.in -D BATCH_TILE=16 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-avx-x16.c & 47tools/xngen src/f32-qs8-vcvt/avx.c.in -D BATCH_TILE=24 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-avx-x24.c & 48tools/xngen src/f32-qs8-vcvt/avx.c.in -D BATCH_TILE=32 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-avx-x32.c & 49 50tools/xngen src/f32-qs8-vcvt/avx.c.in -D BATCH_TILE=8 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-avx-x8.c & 51tools/xngen src/f32-qs8-vcvt/avx.c.in -D BATCH_TILE=16 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-avx-x16.c & 52tools/xngen src/f32-qs8-vcvt/avx.c.in -D BATCH_TILE=24 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-avx-x24.c & 53tools/xngen src/f32-qs8-vcvt/avx.c.in -D BATCH_TILE=32 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-avx-x32.c & 54 55tools/xngen src/f32-qs8-vcvt/avx2.c.in -D BATCH_TILE=16 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-avx2-x16.c & 56tools/xngen src/f32-qs8-vcvt/avx2.c.in -D BATCH_TILE=32 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-avx2-x32.c & 57tools/xngen src/f32-qs8-vcvt/avx2.c.in -D BATCH_TILE=48 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-avx2-x48.c & 58tools/xngen src/f32-qs8-vcvt/avx2.c.in -D BATCH_TILE=64 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-avx2-x64.c & 59 60tools/xngen src/f32-qs8-vcvt/avx2.c.in -D BATCH_TILE=16 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-avx2-x16.c & 61tools/xngen src/f32-qs8-vcvt/avx2.c.in -D BATCH_TILE=32 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-avx2-x32.c & 62tools/xngen src/f32-qs8-vcvt/avx2.c.in -D BATCH_TILE=48 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-avx2-x48.c & 63tools/xngen src/f32-qs8-vcvt/avx2.c.in -D BATCH_TILE=64 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-avx2-x64.c & 64 65################################# x86 512-bit ################################# 66tools/xngen src/f32-qs8-vcvt/avx512skx.c.in -D BATCH_TILE=32 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-avx512skx-x32.c & 67tools/xngen src/f32-qs8-vcvt/avx512skx.c.in -D BATCH_TILE=64 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-avx512skx-x64.c & 68tools/xngen src/f32-qs8-vcvt/avx512skx.c.in -D BATCH_TILE=96 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-avx512skx-x96.c & 69tools/xngen src/f32-qs8-vcvt/avx512skx.c.in -D BATCH_TILE=128 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-avx512skx-x128.c & 70 71tools/xngen src/f32-qs8-vcvt/avx512skx.c.in -D BATCH_TILE=32 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-avx512skx-x32.c & 72tools/xngen src/f32-qs8-vcvt/avx512skx.c.in -D BATCH_TILE=64 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-avx512skx-x64.c & 73tools/xngen src/f32-qs8-vcvt/avx512skx.c.in -D BATCH_TILE=96 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-avx512skx-x96.c & 74tools/xngen src/f32-qs8-vcvt/avx512skx.c.in -D BATCH_TILE=128 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-avx512skx-x128.c & 75 76################################## WAsm SIMD ################################## 77tools/xngen src/f32-qs8-vcvt/wasmsimd-cvt.c.in -D BATCH_TILE=8 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-wasmsimd-cvt-x8.c & 78tools/xngen src/f32-qs8-vcvt/wasmsimd-cvt.c.in -D BATCH_TILE=16 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-wasmsimd-cvt-x16.c & 79tools/xngen src/f32-qs8-vcvt/wasmsimd-cvt.c.in -D BATCH_TILE=24 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-wasmsimd-cvt-x24.c & 80tools/xngen src/f32-qs8-vcvt/wasmsimd-cvt.c.in -D BATCH_TILE=32 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-wasmsimd-cvt-x32.c & 81 82tools/xngen src/f32-qs8-vcvt/wasmsimd-cvt.c.in -D BATCH_TILE=8 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-wasmsimd-cvt-x8.c & 83tools/xngen src/f32-qs8-vcvt/wasmsimd-cvt.c.in -D BATCH_TILE=16 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-wasmsimd-cvt-x16.c & 84tools/xngen src/f32-qs8-vcvt/wasmsimd-cvt.c.in -D BATCH_TILE=24 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-wasmsimd-cvt-x24.c & 85tools/xngen src/f32-qs8-vcvt/wasmsimd-cvt.c.in -D BATCH_TILE=32 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-wasmsimd-cvt-x32.c & 86 87tools/xngen src/f32-qs8-vcvt/wasmsimd-magic.c.in -D BATCH_TILE=8 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-wasmsimd-magic-x8.c & 88tools/xngen src/f32-qs8-vcvt/wasmsimd-magic.c.in -D BATCH_TILE=16 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-wasmsimd-magic-x16.c & 89tools/xngen src/f32-qs8-vcvt/wasmsimd-magic.c.in -D BATCH_TILE=24 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-wasmsimd-magic-x24.c & 90tools/xngen src/f32-qs8-vcvt/wasmsimd-magic.c.in -D BATCH_TILE=32 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-wasmsimd-magic-x32.c & 91 92tools/xngen src/f32-qs8-vcvt/wasmsimd-magic.c.in -D BATCH_TILE=8 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-wasmsimd-magic-x8.c & 93tools/xngen src/f32-qs8-vcvt/wasmsimd-magic.c.in -D BATCH_TILE=16 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-wasmsimd-magic-x16.c & 94tools/xngen src/f32-qs8-vcvt/wasmsimd-magic.c.in -D BATCH_TILE=24 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-wasmsimd-magic-x24.c & 95tools/xngen src/f32-qs8-vcvt/wasmsimd-magic.c.in -D BATCH_TILE=32 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-wasmsimd-magic-x32.c & 96 97##################################### WAsm #################################### 98tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=1 -D DATATYPE=QS8 -D WASM=1 -o src/f32-qs8-vcvt/gen/vcvt-wasm-fmagic-x1.c & 99tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=2 -D DATATYPE=QS8 -D WASM=1 -o src/f32-qs8-vcvt/gen/vcvt-wasm-fmagic-x2.c & 100tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=3 -D DATATYPE=QS8 -D WASM=1 -o src/f32-qs8-vcvt/gen/vcvt-wasm-fmagic-x3.c & 101tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=4 -D DATATYPE=QS8 -D WASM=1 -o src/f32-qs8-vcvt/gen/vcvt-wasm-fmagic-x4.c & 102 103tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=1 -D DATATYPE=QU8 -D WASM=1 -o src/f32-qu8-vcvt/gen/vcvt-wasm-fmagic-x1.c & 104tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=2 -D DATATYPE=QU8 -D WASM=1 -o src/f32-qu8-vcvt/gen/vcvt-wasm-fmagic-x2.c & 105tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=3 -D DATATYPE=QU8 -D WASM=1 -o src/f32-qu8-vcvt/gen/vcvt-wasm-fmagic-x3.c & 106tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=4 -D DATATYPE=QU8 -D WASM=1 -o src/f32-qu8-vcvt/gen/vcvt-wasm-fmagic-x4.c & 107 108#################################### Scalar ################################### 109tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=1 -D DATATYPE=QS8 -D WASM=0 -o src/f32-qs8-vcvt/gen/vcvt-scalar-fmagic-x1.c & 110tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=2 -D DATATYPE=QS8 -D WASM=0 -o src/f32-qs8-vcvt/gen/vcvt-scalar-fmagic-x2.c & 111tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=3 -D DATATYPE=QS8 -D WASM=0 -o src/f32-qs8-vcvt/gen/vcvt-scalar-fmagic-x3.c & 112tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=4 -D DATATYPE=QS8 -D WASM=0 -o src/f32-qs8-vcvt/gen/vcvt-scalar-fmagic-x4.c & 113 114tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=1 -D DATATYPE=QU8 -D WASM=0 -o src/f32-qu8-vcvt/gen/vcvt-scalar-fmagic-x1.c & 115tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=2 -D DATATYPE=QU8 -D WASM=0 -o src/f32-qu8-vcvt/gen/vcvt-scalar-fmagic-x2.c & 116tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=3 -D DATATYPE=QU8 -D WASM=0 -o src/f32-qu8-vcvt/gen/vcvt-scalar-fmagic-x3.c & 117tools/xngen src/f32-qs8-vcvt/scalar-fmagic.c.in -D BATCH_TILE=4 -D DATATYPE=QU8 -D WASM=0 -o src/f32-qu8-vcvt/gen/vcvt-scalar-fmagic-x4.c & 118 119tools/xngen src/f32-qs8-vcvt/scalar-imagic.c.in -D BATCH_TILE=1 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-scalar-imagic-x1.c & 120tools/xngen src/f32-qs8-vcvt/scalar-imagic.c.in -D BATCH_TILE=2 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-scalar-imagic-x2.c & 121tools/xngen src/f32-qs8-vcvt/scalar-imagic.c.in -D BATCH_TILE=3 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-scalar-imagic-x3.c & 122tools/xngen src/f32-qs8-vcvt/scalar-imagic.c.in -D BATCH_TILE=4 -D DATATYPE=QS8 -o src/f32-qs8-vcvt/gen/vcvt-scalar-imagic-x4.c & 123 124tools/xngen src/f32-qs8-vcvt/scalar-imagic.c.in -D BATCH_TILE=1 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-scalar-imagic-x1.c & 125tools/xngen src/f32-qs8-vcvt/scalar-imagic.c.in -D BATCH_TILE=2 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-scalar-imagic-x2.c & 126tools/xngen src/f32-qs8-vcvt/scalar-imagic.c.in -D BATCH_TILE=3 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-scalar-imagic-x3.c & 127tools/xngen src/f32-qs8-vcvt/scalar-imagic.c.in -D BATCH_TILE=4 -D DATATYPE=QU8 -o src/f32-qu8-vcvt/gen/vcvt-scalar-imagic-x4.c & 128 129tools/xngen src/f32-qs8-vcvt/scalar-lrintf.c.in -D BATCH_TILE=1 -D DATATYPE=QS8 -D WASM=0 -o src/f32-qs8-vcvt/gen/vcvt-scalar-lrintf-x1.c & 130tools/xngen src/f32-qs8-vcvt/scalar-lrintf.c.in -D BATCH_TILE=2 -D DATATYPE=QS8 -D WASM=0 -o src/f32-qs8-vcvt/gen/vcvt-scalar-lrintf-x2.c & 131tools/xngen src/f32-qs8-vcvt/scalar-lrintf.c.in -D BATCH_TILE=3 -D DATATYPE=QS8 -D WASM=0 -o src/f32-qs8-vcvt/gen/vcvt-scalar-lrintf-x3.c & 132tools/xngen src/f32-qs8-vcvt/scalar-lrintf.c.in -D BATCH_TILE=4 -D DATATYPE=QS8 -D WASM=0 -o src/f32-qs8-vcvt/gen/vcvt-scalar-lrintf-x4.c & 133 134tools/xngen src/f32-qs8-vcvt/scalar-lrintf.c.in -D BATCH_TILE=1 -D DATATYPE=QU8 -D WASM=0 -o src/f32-qu8-vcvt/gen/vcvt-scalar-lrintf-x1.c & 135tools/xngen src/f32-qs8-vcvt/scalar-lrintf.c.in -D BATCH_TILE=2 -D DATATYPE=QU8 -D WASM=0 -o src/f32-qu8-vcvt/gen/vcvt-scalar-lrintf-x2.c & 136tools/xngen src/f32-qs8-vcvt/scalar-lrintf.c.in -D BATCH_TILE=3 -D DATATYPE=QU8 -D WASM=0 -o src/f32-qu8-vcvt/gen/vcvt-scalar-lrintf-x3.c & 137tools/xngen src/f32-qs8-vcvt/scalar-lrintf.c.in -D BATCH_TILE=4 -D DATATYPE=QU8 -D WASM=0 -o src/f32-qu8-vcvt/gen/vcvt-scalar-lrintf-x4.c & 138 139################################## Unit tests ################################# 140tools/generate-vcvt-test.py --spec test/f32-qs8-vcvt.yaml --output test/f32-qs8-vcvt.cc & 141tools/generate-vcvt-test.py --spec test/f32-qu8-vcvt.yaml --output test/f32-qu8-vcvt.cc & 142 143wait 144