commit | 5d8b054a96d24c897b5ceb2971d524e68b690463 | [log] [tgz] |
---|---|---|
author | Scott Todd <scotttodd@google.com> | Thu Dec 01 15:36:11 2022 -0800 |
committer | GitHub <noreply@github.com> | Thu Dec 01 15:36:11 2022 -0800 |
tree | 8baa510f4fa7b78004b98d55d300414593415816 | |
parent | 4ccfe7909ec38cd12faca525d3830242599ead35 [diff] |
[WebGPU] Push constants Storage i32 -> Uniform vector<4xi32>. (#11392) We discussed this [here on Discord](https://discord.com/channels/689900678990135345/867052513935753277/1047198677514600518). When using `tensor<Nxi32>` we get an error like this from Tint: ``` Tint reported 1 error(s) for a SPIR-V program, see diagnostics: error: line:36: Structure id 8 decorated as Block for variable in Uniform storage class must follow relaxed uniform buffer layout rules: member 0 contains an array with stride 4 not satisfying alignment to 16 ``` Following the spec: https://www.w3.org/TR/WGSL/#address-space-layout-constraints, we should be aligning to 16. Switching to `tensor<Nxvector<4xi32>>` gives us that alignment. This change packs a conceptual array of `i32`s into an array of `vector<4xi32>`s - possibly with unused elements at the end. Unpacking changes from using just `tensor::ExtractOp` to using `tensor::ExtractOp` (to get one of the vec4s) -> `vector::ExtractElementOp` (to get the specific element).
IREE (Intermediate Representation Execution Environment, pronounced as “eerie”) is an MLIR-based end-to-end compiler and runtime that lowers Machine Learning (ML) models to a unified IR that scales up to meet the needs of the datacenter and down to satisfy the constraints and special considerations of mobile and edge deployments.
See our website for project details, user guides, and instructions on building from source.
IREE is still in its early phase. We have settled down on the overarching infrastructure and are actively improving various software components as well as project logistics. It is still quite far from ready for everyday use and is made available without any support at the moment. With that said, we welcome any kind of feedback on any communication channels!
See our website for more information.
IREE is licensed under the terms of the Apache 2.0 License with LLVM Exceptions. See LICENSE for more information.