Skip to content

Commit fbf81fa

Browse files
dshi7meta-codesync[bot]
authored andcommitted
Reland #705 [TLX] Skip InvalidBarrierOp insertion in Fixup on AMD (#722)
Summary: This patch fixes the broken TLX unit test on AMD third-party/triton/beta/triton:py_tlx_amd_test - test_tlx.py::test_wait_arrive_non_ws[1024] Pull Request resolved: #722 Reviewed By: karthik-man Differential Revision: D88494734 Pulled By: dshi7 fbshipit-source-id: 06890456c56c2384fe178751e7c404e3bea57e60
1 parent 49ea7d2 commit fbf81fa

File tree

1 file changed

+7
-1
lines changed
  • third_party/tlx/dialect/lib/Transforms

1 file changed

+7
-1
lines changed

third_party/tlx/dialect/lib/Transforms/Fixup.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ class TritonTLXFixupPass : public impl::TritonTLXFixupBase<TritonTLXFixupPass> {
119119
return success();
120120
}
121121

122+
bool isAMD() const {
123+
// target is set up as f"hip:{options.arch}"
124+
return (target.getValue().find("hip:") == 0);
125+
}
126+
122127
void runOnOperation() override {
123128
ModuleOp mod = getOperation();
124129

@@ -134,7 +139,8 @@ class TritonTLXFixupPass : public impl::TritonTLXFixupBase<TritonTLXFixupPass> {
134139
return signalPassFailure();
135140
}
136141

137-
if (failed(insertInvalBarrier(mod))) {
142+
// InvalBarrierOp insertion is not needed for AMD
143+
if (!isAMD() && failed(insertInvalBarrier(mod))) {
138144
return signalPassFailure();
139145
}
140146

0 commit comments

Comments
 (0)