commit | 865177793c6ef54eb527fed985c37ba0bf365457 | [log] [tgz] |
---|---|---|
author | Lei Zhang <antiagainst@gmail.com> | Fri Oct 06 13:46:08 2023 -0400 |
committer | GitHub <noreply@github.com> | Fri Oct 06 17:46:08 2023 +0000 |
tree | 669d5b92810e1b02dc082400b946f6619d467a2a | |
parent | 9e9aff08125412d831094dd1d303b5869a9cab6d [diff] |
[gpu] Add basic heuristics for better reduction occupancy (#15120) For subgroup reduction, currently a workgroup processes all elements in all reduction dimensions. We need to first make sure the workgroup size we use can divide the total reduction size, and it's also within hardware limitations. At the moment we err on the side of using the largest workgroup size possible; that's good for pure 1-D reduction where we can only ever launch one workgroup. Recent work for LLMs we are using subgroup reduction pipeline for matvec operations--there are parallel dimensions there and can be large. For such cases, we need to strike a balance-- 1) parallel dimensions are distributed to workgroups. If there are many workgroups dispatched, we'd want to have each GPU core hosting multiple of them for occupancy. 2) we want each thread to read quite a few 128-bit vectors for better memory cache behavior. Both require using a smaller workgroup size. So this commit add basic heuristics to consider these facts and improve occupancy.
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.