Skip to content

[XPU] Sync internal 5a664566 cluster + SDNN v0.3.6.7.0 and conceal IR - #992

Open
dongjibin1996 wants to merge 13 commits into
flagos-ai:mainfrom
dongjibin1996:xpu-sync-internal-5a664566
Open

[XPU] Sync internal 5a664566 cluster + SDNN v0.3.6.7.0 and conceal IR#992
dongjibin1996 wants to merge 13 commits into
flagos-ai:mainfrom
dongjibin1996:xpu-sync-internal-5a664566

Conversation

@dongjibin1996

@dongjibin1996 dongjibin1996 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Sync FlagTree XPU from internal Triton triton_3.6 tip 5a664566, rebased onto xpu/triton-3.6-migration (100abf4).

  • New XPU analysis/pass subsystem and remaining same-name cluster alignment except TLE-only paths
  • Conceal IR / MLIR_ENABLE_DUMP in non-Debug XPU builds (TRITON_CONCEAL_IR)
  • SDNN objects v0.3.6.7.1:
    • XPUToIRTranslationForSDNN.o rebuilt from 5a664566 against llvm_trust
    • libdevice-xpu3s.bc rebuilt from 5a664566 with llvm_trust clang
    • liblaunch.a from internal 5a664566 backend output

Intentionally not included

  • TLE convert isTLE and TLE/Pack/Unpack lowering
  • Default-on memory-async / budget-tiling / loop-invariant-staging

Validation

@github-actions github-actions Bot added DOC Improvements or additions to documentation tle xpu CORE main labels Aug 14, 2026
@dongjibin1996
dongjibin1996 force-pushed the xpu-sync-internal-5a664566 branch 2 times, most recently from 3fd166e to 8b7db98 Compare August 14, 2026 10:32
Import Scalar/Tile/Vectorizability analysis and the new XPU-only
passes (Normalize, AsyncLoadSchedule, TLELegalize, LoopInvariantStaging,
LegalizeExternEW). Add stage_sm / load_scalar_indexed ops plus GM2SM
lowering. Preserve handwritten OffsetAnalysis attrs and keep
budget-tiling / loop-invariant-staging off by default.

Source: baidu/xpu/triton 6848085b..5a664566. SDNN/.a artifacts are
not included.
The C++ binding now requires vrf_budget/budget_tiling/pin_unroll_num.
Keep budget tiling off and pin_unroll_num=-1 so vector-add stays
on the legacy unroll path.
Merge OffsetAnalysis GetNumPrograms/remsi/handwritten recovery,
Scan loop-carry lowering, CoreTiling TypeSwitch getChain, UnrollControl
budget model, and LM-only DMA mfence. Drop Pack/Unpack and GetEnv
whitelist usage so FlagTree still compiles. P800 vector-add stays
max_abs_err=0.0. SDNN artifacts are harvested but not installed.
Extend add_xpu_sdnn_object(TritonSDNNTransforms) to the full
internal source list (34 objects). Prebuilt .o files stay
gitignored and are installed from the rebuilt artifact dir.
5a664566 TritonSDNNToLLVM.cpp.o needs translateLLVMIRToModule.
Keep the dependency on the XPU SDNN target, not the main tree.
Pass load_tile_size into convert-triton-to-tritonsdnn and wire the
new SDNN transform passes so mm kernels can compile against the
rebuilt objects.
Point xpu.py at the 5a664566 SDNN package. The tarball includes the
CombineBefore getenv fix, the v0.3.6.6.0 translation ABI object, and
the 28-member libTritonSharedForXPU.a.
Guard XPU ir.cc printers and enable_debug with TRITON_CONCEAL_IR so
MLIR_ENABLE_DUMP emits no per-pass IR. Define the macro from
third_party/xpu/CMakeLists.txt for XPU Release builds only.
FlagTree default build type is TritonRelBuildWithAsserts, which does
not inherit CMAKE_CXX_FLAGS_RELEASE. Define the macro for that config
and all non-Debug XPU builds so MLIR_ENABLE_DUMP stays off.
ir.cc is compiled by the top-level triton target, so directory flags
in third_party/xpu never reached it. Defer target_compile_definitions
onto triton after it is created.
Rebuild XPUToIRTranslationForSDNN.o against llvm_trust from internal
5a664566, and refresh libdevice-xpu3s.bc / liblaunch.a from the same
tip. P800 vector-add and fp16 mm stay max_abs_err=0.0.
@dongjibin1996
dongjibin1996 force-pushed the xpu-sync-internal-5a664566 branch from 8b7db98 to d1fe1a9 Compare August 14, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE DOC Improvements or additions to documentation main tle xpu

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant