Skip to content

[BACKEND][TLE] add sunrise backend with tle#726

Open
xdali-adora wants to merge 5 commits into
flagos-ai:triton_v3.6.xfrom
xdali-adora:sunrise/triton_v3.6.x_with_tle_os
Open

[BACKEND][TLE] add sunrise backend with tle#726
xdali-adora wants to merge 5 commits into
flagos-ai:triton_v3.6.xfrom
xdali-adora:sunrise/triton_v3.6.x_with_tle_os

Conversation

@xdali-adora

Copy link
Copy Markdown

No description provided.

@CLAassistant

CLAassistant commented Jun 29, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


lixingda seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment thread .github/workflows/sunrise-build-and-test.yml Outdated
Comment thread lib/Dialect/Triton/Transforms/RewriteTensorPointer.cpp Outdated
Comment thread python/setup_tools/setup_helper.py Outdated
Comment thread python/setup_tools/setup_helper.py Outdated
Comment thread python/setup_tools/setup_helper.py Outdated
Comment thread python/setup_tools/setup_helper.py Outdated
Comment thread python/setup_tools/setup_helper.py Outdated
Comment thread python/setup_tools/setup_helper.py Outdated
return false;
if (!forOp->isAncestor(owner))
return false;
return domInfo.properlyDominates(store.getOperation(), owner);
return domInfo.properlyDominates(storeOp, owner);

@zhzhcookie zhzhcookie Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary change?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

structured bindings is not available in c++17 (until c++20),but the CMAKE_CXX_STANDARD set to 17

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out. I may be missing something, but I do not see any structured bindings in this snippet. Also, structured bindings are a C++17 feature, so they should be allowed with CMAKE_CXX_STANDARD set to 17.

Could you point me to the exact expression you are concerned about? If there is any C++20-only construct here, I am happy to adjust it.

@xdali-adora xdali-adora Jun 29, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for (auto &[dst, store] : storeByDst) { if (!store || duplicateStores.contains(dst)) continue; if (!isSafeToPromote(store, forOp, domInfo)) continue; OpBuilder builder(store); auto stage = builder.create<ttg::LocalAllocOp>( store.getLoc(), store.getDst().getType(), store.getSrc()); Operation *storeOp = store.getOperation(); dst.replaceUsesWithIf(stage.getResult(), [&](OpOperand &use) { Operation *owner = use.getOwner(); if (owner == storeOp) return false; if (!forOp->isAncestor(owner)) return false; return domInfo.properlyDominates(storeOp, owner); });

with store in the lambda function,there reports an error as follows
TlePromoteLocalStoreStaging.cpp:171:24: error: captured structured bindings are a C++20 extension [-Werror,-Wc++20-extensions]
171 | if (owner == store.getOperation())
| ^
TlePromoteLocalStoreStaging.cpp:159:24: note: 'store' declared here
159 | for (auto &[dst, store] : storeByDst) {
| ^

@sunnycase

Copy link
Copy Markdown
Collaborator

Thanks for the contribution and for adding TLE support for the sunrise backend.

Could you please update the PR description or add supporting documentation to explain which TLE primitives are implemented/supported by this work, and include performance benefit data so reviewers can evaluate whether the implementation scope matches the expected value?

It would be helpful to include:

  • The list of implemented TLE primitives, their semantic coverage, and any partial support or known limitations.
  • The lowering/runtime path for each key primitive, especially where it differs from the native Triton path.
  • Performance data: benchmark cases, input sizes, hardware/driver environment, baseline, before/after results, improvement ratio, and any regression cases.
  • If this PR is currently only structural enablement and has no measurable performance gain yet, please state that explicitly and describe the follow-up validation plan.

Comment thread setup.py Outdated

def get_packages():
yield from find_packages(where="python", include=["triton", "triton.*"])
yield from find_namespace_packages(where="python", include=["triton", "triton.*"])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which dir without __init__.py does sunrise backend need?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread python/setup_tools/setup_helper.py
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
@xdali-adora xdali-adora force-pushed the sunrise/triton_v3.6.x_with_tle_os branch from df25a4a to 67517a8 Compare June 29, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants