Skip to content

Commit 0f1ef29

Browse files
authored
Merge OpenAI Triton commit d183197 (#4782)
This PR change the Triton base from 87f5aa4 to d183197 (Jul 16). Pass rate: 98.62% Please do not squash and merge this PR.
2 parents 8609010 + d67959e commit 0f1ef29

File tree

65 files changed

+1995
-825
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1995
-825
lines changed

.github/workflows/integration-tests-nvidia.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
integration-tests-nvidia:
1414
runs-on: ${{ matrix.runner }}
1515
timeout-minutes: 60
16+
# Let A100 and H100 continue even if GB200 fails, as it's a bit flaky
17+
continue-on-error: ${{ matrix.runner[0] == 'nvidia-gb200'}}
1618
strategy:
1719
matrix:
1820
runner: ${{ fromJson(inputs.matrix) }}

docs/meetups/for_moderators/README.md

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
### How to run a Triton Community Meetup
2+
3+
Contributors: Bill Yoshimi, Areg Melikadamyan, Whitney Tsang, Ksharma Pawar
4+
5+
Last updated: July 3, 2025
6+
7+
Community meetups give the on-line community a chance to interact with each other and the Triton developers in a more face-to-face format vs slack chats. Example topics covered during community meetups include:
8+
* Developers presenting updates on features they’re working on.
9+
* Developers asking community for feedback on new initiatives
10+
* Questions from community for developers
11+
* Questions about Triton strategy/direction.
12+
13+
14+
## Some logistics
15+
16+
Community meetups occur once 8 weeks (usually during the first 1-2 weeks of a month).
17+
Reminders are sent out 2 weeks ahead of time
18+
19+
Only companies that paid for corp Microsoft Teams access can create webinars. Three folks who have done this (or have access in the past are):
20+
* Areg Melikadamyan
21+
* Whitney Tsang
22+
* Ksharma Pawar
23+
* Jian Hui
24+
25+
Webinars are automatically recorded. The person with corp access can upload the video to youtube after the webinar is finished.
26+
27+
Only the person with corp access can open a webinar. Even if you’re a registered speaker or MC, you’ll see
28+
29+
<div align="center">
30+
<img src="https://private-user-images.githubusercontent.com/85795580/459649517-42acf22a-6ae3-4c0f-a585-dffc25fabc33.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTE1NTg1MzEsIm5iZiI6MTc1MTU1ODIzMSwicGF0aCI6Ii84NTc5NTU4MC80NTk2NDk1MTctNDJhY2YyMmEtNmFlMy00YzBmLWE1ODUtZGZmYzI1ZmFiYzMzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA3MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNzAzVDE1NTcxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZhZWQ2NjQ3MDIxNGVkNThkMGYxZmNjMmI2Yzg5MjMyZTAxZGI5NmFiZDIwYzczMDc0N2YzOTM3MTYwMThiOWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.UwzTbqMIsFw1Ex9t-5HY8A3KHzOnY6eqgqz2eJ0qTbE" alt="Microsoft Meeting waiting for meeting to start view">
31+
</div>
32+
33+
34+
before the meeting owner opens it up.
35+
36+
During the meetup, take notes.
37+
38+
Post the final notes on the Triton-lang website here: https://github.com/triton-lang/triton/tree/main/docs/meetups
39+
40+
## How to run a community meetup
41+
42+
1. Work with one of the folks above to create a Microsoft Teams webinar (occurring 6-8 weeks in the future). Template:
43+
44+
<pre>
45+
Title: “Triton Community Meetup (online)”
46+
External presenter: **“<your name>”**
47+
Co-organizer: **add organizers**
48+
Date: **Add date**
49+
Time: 10:00-11:00 PDT
50+
Duration: 1 hr
51+
Recurring meeting: link **(created by [email protected])**
52+
</pre>
53+
54+
2. If you don’t have details about the meeting (e.g. meeting ID, passcode, phone number, etc.) you can login to the meeting, click on More -> Meeting Info and get data that way.
55+
56+
<div align="center">
57+
<img src="https://private-user-images.githubusercontent.com/85795580/459649518-f9a924df-2020-4dde-b8bb-e901a9298cef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTE1NTg1MzEsIm5iZiI6MTc1MTU1ODIzMSwicGF0aCI6Ii84NTc5NTU4MC80NTk2NDk1MTgtZjlhOTI0ZGYtMjAyMC00ZGRlLWI4YmItZTkwMWE5Mjk4Y2VmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA3MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNzAzVDE1NTcxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM0YzI3OGRmMWI1NDk2NjQxOTJhMmJiNTM5ZDg4ZGZjOTk4OGM2YWRkNTk1ZTY4NjNhMjk2ZWZlZDhiZDYzZGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6bgthh7pHDV-ooMMm1WsgbbLJH39nzk-DPre6GDjZnI" alt="Microsoft Meeting info pane">
58+
</div>
59+
60+
3. Copy the invite generated from the meeting to [triton #general chat](https://app.slack.com/huddle/T01379XQ9FG/C013E22BPPC) on slack. Example text to use in slack:
61+
62+
<pre>
63+
The next community meetup will be on <date> from 10am-11am PST. The meeting link is below. If anyone has agenda items to add for the meetup please reach out to me.
64+
65+
Thanks,
66+
**<your name>**
67+
----
68+
Microsoft Teams Need help?
69+
Join the meeting now <- **change this**
70+
Meeting ID: 247 993 489 59 <- **change this**
71+
Passcode: Dg8TLJ <- **change this**
72+
Dial in by phone
73+
+1 323-849-4874,,637393478# United States, Los Angeles <- **change this**
74+
Find a local number
75+
Phone conference ID: 637 393 478# <- **change this**
76+
</pre>
77+
78+
4. Post the same invite to the [#triton channel on Discord GPU_MODE](https://discord.com/channels/1189498204333543425/1189607595451895918). You will need to join GPU_MODE to post to it.
79+
80+
5. 1-2 Days before the meeting. Verify that someone with corp Microsoft Teams access will open the meeting up for you.
81+
6. Day before meeting, post reminders to slack and discord (reply to your original message):
82+
Reminder, this month's community meetup is tomorrow at 10am PST.
83+
84+
<pre>
85+
Agenda:
86+
Topic #1 <who>
87+
Topic #2 <who>
88+
</pre>
89+
90+
7. Day of meeting, login a little early and verify everything is working as expected.
91+
92+
8. During the meeting, keep an eye on the comments section. Some folks might post questions for the speaker there and/or issues they're having with Teams.
93+
94+
9. After the meeting has finished, work with the person with corp Microsoft Teams access to upload the recorded video to youtube. Post the youtube link in [triton #general chat](https://app.slack.com/huddle/T01379XQ9FG/C013E22BPPC).
95+
96+
If this is your first time using Microsoft Teams, work with the meeting creator to test out the UI (e.g. logging in, verifying your camera, audio work, verifying you can present your screen if using that functionality, play around with hand raising, play around with people/attendees/muting others, log off and log back in again.)
97+
98+
## How to upload videos to Youtube
99+
100+
1. Register to use youtube. That is, the top right symbol when you go to youtube.com should be your login.
101+
102+
<div align="center">
103+
<img src="https://private-user-images.githubusercontent.com/85795580/459649516-4bea87d7-1c6b-4331-92c1-e480b2f3d295.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTE1NTg1MzEsIm5iZiI6MTc1MTU1ODIzMSwicGF0aCI6Ii84NTc5NTU4MC80NTk2NDk1MTYtNGJlYTg3ZDctMWM2Yi00MzMxLTkyYzEtZTQ4MGIyZjNkMjk1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA3MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNzAzVDE1NTcxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVjNWUxMTIzNTA4MGQxMmRkMjQ1NWQzMzFhMTIwNmVhZDNhMmJlMWQwMDQwYmUyNmQ4YTkwNTUxMTI3ZWJjNjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RUIK1GbqVtC8sfu_2ntb8to9FFQv7MfHrYbvNCfLCh8" alt="Youtube Login">
104+
</div>
105+
106+
2. Click on https://www.youtube.com/feed/you
107+
3. Click on “+ Create” on top next to search box.
108+
4. Select the video you want to upload
109+
5. For Title use something like “Triton Community Meetup May 2025”
110+
6. No, it’s not made for kids
111+
7. No video elements
112+
8. Save or publish: “public”
113+
9. Make a copy of the video link so you can post it on slack and discord. (like: https://youtu.be/kJjBurkPn_8)
114+
115+
116+
## Past community meetups
117+
118+
| Date | Meet setup | Agenda & who | Recording |
119+
| ---- | ---------- | ------------ | --------- |
120+
| 2025-05-01 | [Link](https://tinyurl.com/mr397f6x) | Topic: what are plans for existing block pointer programming model? (Context: Intel GPU backend relies heavily on it and will need time to fully move to tensor descriptor programming model.) - Jianhui Li, Intel <br/> Topic: infrastructure for Triton performance tests - Sayce, Google<br/>Topic: what talks/tutorials/open discussions would you like to see at the 2025 Triton Developers’ Summit? How can we help? - Adnan Aziz, Meta <br/> Topic: what are plans for existing block pointer programming model? (Context: Intel GPU backend relies heavily on it and will need time to fully move to tensor descriptor programming model.) - Jianhui Li, Intel<br/>Topic: infrastructure for Triton performance tests - Sayce, Google<br/>Topic: what talks/tutorials/open discussions would you like to see at the 2025 Triton Developers’ Summit? How can we help? - Adnan Aziz, Meta </pre> | https://www.youtube.com/watch?v=W16BrXc5BYE |
121+
| 2025-07-09 |[Link](https://tinyurl.com/mus5wyax) | Topic: Gluon update - Jeff Niu, OpenAI <br/> Topic: Interest and requirements for a nightly performance regression suite - Simon Waters, kernelize.ai<br/>Triton developer's summit update - Ofer Dekel, Microsoft | |

include/triton/Conversion/TritonGPUToLLVM/Utility.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,25 @@ inline bool isCanonicalIndex(unsigned index, unsigned freeVarMask) {
624624
// group code isolated from above by invoking this function.
625625
void makeAllWarpGroupsIsolatedFromAbove(Operation *op);
626626

627+
/// Converts ConverLayoutOp to llvm using padded pattern.
628+
/// This pattern adds unused memory locations after every rows of tensor fastest
629+
/// changing dimension:
630+
/// e0 e1 e2 e3 p p \
631+
/// e4 e5 e6 e7 p p \
632+
/// ...
633+
/// e e e e p p
634+
/// Dimension order is chosen in order to use wide output reads.
635+
///
636+
/// \param op operation to convert
637+
/// \param src llvm structure containing operation input
638+
/// \param targetInfo
639+
/// \param typeConverter
640+
/// \param rewriter
641+
/// \returns llvm structure containing converted output
642+
Value transferWithinBlockPadding(triton::gpu::ConvertLayoutOp op, Value src,
643+
const TargetInfoBase &targetInfo,
644+
const LLVMTypeConverter *typeConverter,
645+
RewriterBase &rewriter);
627646
} // namespace mlir
628647

629648
#endif
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
set(MLIR_BINARY_DIR ${CMAKE_BINARY_DIR})
22

3+
set(LLVM_TARGET_DEFINITIONS GluonOps.td)
4+
mlir_tablegen(Ops.h.inc -gen-op-decls)
5+
mlir_tablegen(Ops.cpp.inc -gen-op-defs)
6+
add_mlir_doc(GluonOps GluonOps dialects/ -gen-op-doc)
7+
38
set(LLVM_TARGET_DEFINITIONS GluonDialect.td)
49
mlir_tablegen(Dialect.h.inc -gen-dialect-decls -dialect=gluon)
510
mlir_tablegen(Dialect.cpp.inc -gen-dialect-defs -dialect=gluon)
6-
mlir_tablegen(Ops.h.inc -gen-op-decls)
7-
mlir_tablegen(Ops.cpp.inc -gen-op-defs)
811
add_mlir_doc(GluonDialect GluonDialect dialects/ -gen-dialect-doc)
9-
add_public_tablegen_target(GluonTableGen)
1012

1113
set(LLVM_TARGET_DEFINITIONS GluonAttrDefs.td)
1214
mlir_tablegen(GluonAttrDefs.h.inc -gen-attrdef-decls)
1315
mlir_tablegen(GluonAttrDefs.cpp.inc -gen-attrdef-defs)
14-
mlir_tablegen(OpsEnums.h.inc -gen-enum-decls)
15-
mlir_tablegen(OpsEnums.cpp.inc -gen-enum-defs)
16-
add_public_tablegen_target(GluonAttrDefsIncGen)
16+
17+
add_public_tablegen_target(GluonTableGen)

include/triton/Dialect/Gluon/IR/Dialect.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@
66

77
#define GET_ATTRDEF_CLASSES
88
#include "triton/Dialect/Gluon/IR/GluonAttrDefs.h.inc"
9+
10+
#define GET_OP_CLASSES
11+
#include "triton/Dialect/Gluon/IR/Ops.h.inc"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#ifndef GLUON_OPS
2+
#define GLUON_OPS
3+
4+
include "triton/Dialect/Gluon/IR/GluonDialect.td"
5+
include "triton/Dialect/Gluon/IR/GluonAttrDefs.td"
6+
include "triton/Dialect/Triton/IR/TritonInterfaces.td"
7+
include "triton/Dialect/Triton/IR/TritonTypes.td"
8+
9+
class Gluon_Op<string mnemonic, list<Trait> traits = []> :
10+
Op<Gluon_Dialect, mnemonic,
11+
!listconcat(traits, [VerifyTensorLayoutsTrait])> {
12+
}
13+
14+
def Gluon_SetAutoLayoutOp : Gluon_Op<"set_auto_layout",
15+
[SameOperandsAndResultShape,
16+
SameOperandsAndResultElementType]> {
17+
let summary = "set auto encoding to a concrete encoding type";
18+
19+
let arguments = (ins TT_Tensor:$src);
20+
21+
let results = (outs TT_Tensor:$result);
22+
23+
let builders = [
24+
OpBuilder<(ins "Attribute":$encoding, "Value":$value)>
25+
];
26+
27+
let hasVerifier = 1;
28+
29+
let assemblyFormat = "$src attr-dict `:` type($src) `->` type($result)";
30+
}
31+
32+
#endif // GLUON_OPS

include/triton/Dialect/Triton/IR/TritonOps.td

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,16 @@ def TT_SplatOp : TT_Op<"splat", [Pure,
432432
let hasFolder = 1;
433433
}
434434

435+
def TT_UnsplatOp : TT_Op<"unsplat", [Pure,
436+
DeclareOpInterfaceMethods<InferTypeOpInterface>]> {
437+
let summary = "convert a tensor with a single element to a scalar";
438+
let arguments = (ins TT_Tensor:$src);
439+
let results = (outs TT_Type:$result);
440+
441+
let assemblyFormat = "$src attr-dict `:` type($src)";
442+
let hasVerifier = 1;
443+
}
444+
435445
def TT_ExpandDimsOp : TT_Op<"expand_dims", [Pure,
436446
DeclareOpInterfaceMethods<InferTypeOpInterface>,
437447
SameOperandsAndResultElementType]> {

include/triton/Dialect/TritonGPU/Transforms/Utility.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,12 @@ void replaceUsesAndPropagateType(OpBuilder &builder, Operation *oldUse,
260260

261261
/// Replace all uses of `old` with a local load from `alloc` unless the use is a
262262
/// `ttg.local_alloc` with a matching shared encoding, in which case the shared
263-
/// memory is forwarded directly into the use.
264-
void replaceUsesWithLocalLoad(
265-
OpBuilder &builder, OpResult old,
266-
TypedValue<triton::gpu::MemDescType> alloc,
267-
TypedValue<triton::gpu::AsyncTokenType> token = {});
263+
/// memory is forwarded directly into the use. Returns the `ttg.local_load` if
264+
/// it created one.
265+
triton::gpu::LocalLoadOp
266+
replaceUsesWithLocalLoad(OpBuilder &builder, OpResult old,
267+
TypedValue<triton::gpu::MemDescType> alloc,
268+
TypedValue<triton::gpu::AsyncTokenType> token = {});
268269

269270
// Return true if the value comes from a load or a block argument.
270271
// This will skip convert layouts and memdesc views.

0 commit comments

Comments
 (0)