commit | b0512e2e6c00583f20b6f3b78c1ca52327ed745a | [log] [tgz] |
---|---|---|
author | Stanley Winata <68087699+raikonenfnu@users.noreply.github.com> | Fri Jul 19 20:50:08 2024 -0700 |
committer | GitHub <noreply@github.com> | Fri Jul 19 20:50:08 2024 -0700 |
tree | ef5d69113aec10a17f3b0a2f08b702226f965da4 | |
parent | 5b112cbc21046aaa028a05da62da1e3f8d19bc20 [diff] |
[GPU][VectDist] Refactor multiReducOp lowering to reduce acc at the end. (#17974) The main motivation behind this commit is to fix the numerics issue we find in Attention GPU C++ pipeline. Where our output seems to be some scale off from reference (i.e out = k * ref). Through experiments we determine that the cause of the issue is the multiReducOp distribution, which is required for scaling/merge computation. Through analyzing of IR and experimentation, reducing the srcVector and non constant accumulator at the same time with another multiDimReduction seems to output numerically wrong values. This commit fixes numerical issue by refactoring the distribution of multireductionOp to 3 steps. First every thread locally reduce the srcVector it holds with combiningIdentity as localInit. Second, it does a subgroup/warp reduce amongs other threads. Finally, each thread does a local reduction of the intermediate reduced data it has with the accumulator it holds. --------- Signed-off-by: Stanley Winata <stanley.winata@amd.com>
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.
Community meeting recordings: IREE YouTube channel
IREE is licensed under the terms of the Apache 2.0 License with LLVM Exceptions. See LICENSE for more information.