Commit Graph

23 Commits

Author SHA1 Message Date
Phil Tillet
2fa0dfbce9 . 2023-01-09 22:50:38 -08:00
Philippe Tillet
ff04a5e9b6 . 2023-01-09 22:11:00 -08:00
Phil Tillet
bae4c40379 reorder conversions to dot operand 2023-01-09 20:13:30 -08:00
Phil Tillet
c98c889d7f . 2023-01-09 19:08:51 -08:00
Phil Tillet
fc1007278d . 2023-01-09 18:45:44 -08:00
Phil Tillet
137e866bd2 more work 2023-01-09 16:20:10 -08:00
Phil Tillet
8ebb593bbb more work 2023-01-09 15:45:06 -08:00
Phil Tillet
6c750b6856 Added verifier for trans 2023-01-08 14:29:17 -08:00
Phil Tillet
600bcefb12 more optimizations 2023-01-06 20:27:49 -08:00
Philippe Tillet
18c7a72973 more pass template 2023-01-06 14:26:06 -08:00
Phil Tillet
b16aeb6541 added missing file 2023-01-06 13:39:54 -08:00
Phil Tillet
a81345f7c1 SinkConversionsFromShared template 2023-01-06 13:01:08 -08:00
Phil Tillet
5c01c567b9 . 2023-01-02 23:13:12 -08:00
Phil Tillet
05920e0b8b reduced some spilling 2023-01-02 19:28:54 -08:00
Phil Tillet
c11fe351e1 . 2023-01-02 19:16:06 -08:00
Phil Tillet
4dce8dd709 Merge remote-tracking branch 'origin/master' into phil/fused-attention-perf-fixup 2022-12-30 11:53:49 -08:00
goostavz
0e8590f1c9 [BACKEND] Add generic support of convert_layout from distributed to shared (#1025) 2022-12-30 11:29:58 -08:00
Phil Tillet
71e3143eaf . 2022-12-29 14:40:27 -08:00
Phil Tillet
263ad883a6 . 2022-12-28 14:23:59 -08:00
Phil Tillet
54ae3e8d6e cleanup 2022-12-28 13:42:43 -08:00
Phil Tillet
0d6e6cf578 trying more things 2022-12-27 20:58:31 -08:00
Yan Chunwei
2ba74d2729 [OPTIMIZER] Update the versionMinor in MMA layout for volta (#1014)
Continue the work https://github.com/openai/triton/pull/990

# Background
The `versionMinor` in MmaEncodingAttr holds some states of DotOp's
operands in Volta, while such operands will be modified by some
patterns, making the states out-of-date.

This PR helps to correct the states.

# Implementation
It adds three new patterns:

1. `CollectMmaToUpdateForVolta` helps to collect and build a map holding
the MmaEncodingAttr instances with wrong states and create new correct
ones for them,
2. `UpdateMMAVersionMinorForVolta` helps to replace the Ops generating
the wrong MmaEncodingAttr instances with new correct ones, currently it
supports the following Ops
    a. `convert_layout[X -> mma]`
    b. `arith.constant SplatAttr : !tensor<mma>`
    c. `dot ... : !tensor<mma>`

# Limitation
This PR chooses the mapping way to bypass the IR walk complexity from
the circular dependency between dot_operand[parent] and mma.
We use the MmaEncodingAttr instance as the mapping key, but there might
be multiple DotOp holding different DotOprand(IsMMAv1Row) that have the
same wrong MmaEncodingAttr instance.
To make each DotOp's (wrong) MmaEncodingAttr unique, we might need an ID
field to MmaEncodingAttr.
2022-12-28 12:24:01 +08:00
Philippe Tillet
20100a7254 Merge triton-mlir branch - Complete rewrite of the backend from scratch (#1004)
This PR merges the `triton-mlir` branch, in which we have been quietly
rewriting the Triton backend from scratch to increase maintainability,
stability and ultimately performance. Changes to the runtime are
minimal, and this new version aims to remain backward-compatible with
the previous commit. The legacy backend is now officially deprecated,
but can still be accessed via the `legacy-backend` tag.

Co-authored-by: Keren Zhou <kerenzhou@openai.com>
Co-authored-by: Yan Chunwei <yanchunwei@outlook.com>
Co-authored-by: goostavz <109190422+goostavz@users.noreply.github.com>
Co-authored-by: Shintaro Iwasaki <siwasaki@fb.com>
Co-authored-by: Yan Da <dyanab@connect.ust.hk>
Co-authored-by: Jun Yang <yangjunpro@gmail.com>
Co-authored-by: Ian Bearman <ianb@microsoft.com>
Co-authored-by: Jason Ansel <jansel@jansel.net>
Co-authored-by: Qingyi Liu <qingyil@nvidia.com>
Co-authored-by: ben-zhang-609 <110140741+ben-zhang-609@users.noreply.github.com>
Co-authored-by: Chenggang Zhao <lyricz@yeah.net>
Co-authored-by: ben-zhang-609 <benzh609@gmail.com>
Co-authored-by: dongdongl <dongdongl@nvidia.com>
2022-12-21 01:30:50 -08:00