diff --git a/README.md b/README.md index 83cdc4da6..d719087d3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,16 @@ -[![Build Status](https://travis-ci.org/WebAssembly/spec.svg?branch=master)](https://travis-ci.org/WebAssembly/spec) +[![Build Status](https://travis-ci.org/WebAssembly/relaxed-simd.svg?branch=master)](https://travis-ci.org/WebAssembly/relaxed-simd) -# spec +# Relaxed SIMD proposal for WebAssembly + +This repository is a clone of [github.com/WebAssembly/spec/](https://github.com/WebAssembly/spec/). +It is meant for discussion, prototype specification and implementation of a proposal to +add support for SIMD instructions with relaxed determinism requirements to WebAssembly. + +* See the [overview](proposals/relaxed-simd/Overview.md) for a summary of the proposal. + +* See the [modified spec](https://webassembly.github.io/relaxed-simd/) for details. + +Original `README` from upstream repository follows… This repository holds the sources for the WebAssembly draft specification (to seed a future diff --git a/document/core/index.rst b/document/core/index.rst index 1d8d6a4aa..b69fa6f51 100644 --- a/document/core/index.rst +++ b/document/core/index.rst @@ -3,7 +3,7 @@ WebAssembly Specification .. only:: html - | Release |release| (Draft, |today|) + | Release |release| + relaxed-simd (Draft, |today|) | Editor: Andreas Rossberg diff --git a/document/core/util/macros.def b/document/core/util/macros.def index 82928c6f8..cfed4ebf3 100644 --- a/document/core/util/macros.def +++ b/document/core/util/macros.def @@ -3,11 +3,11 @@ .. External Standards .. ------------------ -.. |WasmDraft| replace:: https://webassembly.github.io/spec/core/ -.. _WasmDraft: https://webassembly.github.io/spec/core/ +.. |WasmDraft| replace:: https://webassembly.github.io/relaxed-simd/core/ +.. _WasmDraft: https://webassembly.github.io/relaxed-simd/core/ -.. |WasmIssues| replace:: https://github.com/webassembly/spec/issues/ -.. _WasmIssues: https://github.com/webassembly/spec/issues/ +.. |WasmIssues| replace:: https://github.com/webassembly/relaxed-simd/issues/ +.. _WasmIssues: https://github.com/webassembly/relaxed-simd/issues/ .. |IEEE754| replace:: IEEE 754-2019 .. _IEEE754: https://ieeexplore.ieee.org/document/8766229 diff --git a/proposals/relaxed-simd/Overview.md b/proposals/relaxed-simd/Overview.md new file mode 100644 index 000000000..a23c08b01 --- /dev/null +++ b/proposals/relaxed-simd/Overview.md @@ -0,0 +1,29 @@ +# Relaxed SIMD proposal + +## Summary + +This proposal adds a set of useful SIMD instructions that introduce local +non-determinism (where the results of the instructions may vary based on +hardware support). + +## Motivation + +Applications running on Wasm SIMD cannot take full advantage of hardware +capabilities. There are 3 reasons: + +1. Instruction depends on hardware support +2. Approximate instructions that are underspecified in hardware +3. Some SIMD instructions penalize particular architecture + +See [these +slides](https://docs.google.com/presentation/d/1Qnx0nbNTRYhMONLuKyygEduCXNOv3xtWODfXfYokx1Y/edit?usp=sharing) +for more details. + +## Overview + +Some instructions we would like to add: + +- Fused Multiply Add (single rounding if hardware supports it, double rounding if not) +- Approximate reciprocal/reciprocal sqrt +- Relaxed Swizzle (implementation defined out of bounds behavior) +- Relaxed Rounding Q-format Multiplication (optional saturation)