commit | 077168f6c8b2bff9eda724f7d2a764c909d8458c | [log] [tgz] |
---|---|---|
author | Han-Chung Wang <hanchung@google.com> | Thu Nov 17 07:47:34 2022 +0800 |
committer | GitHub <noreply@github.com> | Wed Nov 16 15:47:34 2022 -0800 |
tree | 5cff35b24105082b10e080652d8084daf9a419ba | |
parent | 541d1f3ac0fa43deee35c940871a9db408b4e6b4 [diff] |
[LLVMCPU] Enable vectorization for pack ops. (#11178) It introduces `SplitFullPartialTransferPass` to hook up upstream VectorTransferFullPartialRewriter pattern. The pattern splits a vector.transfer operation into an in-bounds (i.e., no out-of-bounds masking) fastpath and a slowpath. This needs to be applied before converting to LLVM dialect. Verified that we're getting 2x-3x performance improvements from Tracy. For LHS packing, i.e., ```mlir lhs_4d = iree_linalg_ext.pack %lhs inner_dims_pos = [0, 1] inner_tiles = [8, 8] into %lhs_4d_init : (tensor<256x256xi8> tensor<32x32x8x8xi8>) -> tensor<32x32x8x8xi8> ``` The performance is improved from `32.59` us to `10.01` us. For RHS packing, i.e., ```mlir %rhs_4d = iree_linalg_ext.pack %rhs outer_dims_perm = [1, 0] inner_dims_pos = [1, 0] inner_tiles = [8, 8] into %rhs_4d_init : (tensor<256x256xi8> tensor<32x32x8x8xi8>) -> tensor<32x32x8x8xi8> ``` The performance is improved from `32.35` us to `16.11` us. Fixes https://github.com/iree-org/iree/issues/10889
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.