Skip to content

Xpu cleanup 20250625#717

Open
dongjibin1996 wants to merge 3 commits into
flagos-ai:triton_v3.6.xfrom
dongjibin1996:xpu-cleanup-20250625
Open

Xpu cleanup 20250625#717
dongjibin1996 wants to merge 3 commits into
flagos-ai:triton_v3.6.xfrom
dongjibin1996:xpu-cleanup-20250625

Conversation

@dongjibin1996

Copy link
Copy Markdown
Collaborator

No description provided.

@CLAassistant

CLAassistant commented Jun 25, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

Please do not commit this file.

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.

Please do not change this file.

@dongjibin1996 dongjibin1996 force-pushed the xpu-cleanup-20250625 branch from 8247b95 to 2c2ce5d Compare June 28, 2026 10:51
Refine the XPU backend so that nearly all XPU-specific code lives under
third_party/xpu/, minimizing changes to the shared main tree.

Main-tree changes (kept to a minimum; upstream TLE bugfixes only):
- include/triton/Dialect/Triton/IR/Dialect.h: declare SharedMemory
  unconditionally. It is referenced unconditionally by TritonOps.td and by
  AtomicRMW/CAS side effects, so an `#ifdef __TLE__` guard breaks every
  non-TLE build. Added a durable explanatory comment.
- lib/Conversion/TritonToTritonGPU/TritonGPUConversion.cpp: move the dialect
  list separator comma inside the `#ifdef __TLE__` block so the template
  argument list is well-formed in both TLE and non-TLE builds. Added comment.
- setup.py / python/setup_tools/utils/xpu.py: wire in mthreads-style XPU
  python-root overlay so the XPU python package builds from third_party/xpu.

Overlay fixes (all under third_party/xpu/):
- Analysis headers (Alias.h, Allocation.h, AxisInfo.h, Membar.h) realigned
  byte-identical to main tree, fixing the undefined symbol
  ModuleAxisInfoAnalysis::initialize (two-arg signature) and dropping stale
  single-arg API. Utility.h keeps XPU extensions and adopts the new LLVM API
  (resolveCallableInTable + SymbolTableCollection).
- Tools/Sys/GetEnv.hpp: add distinctly-named getStrEnvXPU/getBoolEnvXPU
  helpers (mutex-guarded) to avoid inline weak-symbol dedup against the
  main-tree GetEnv, which previously caused an assertIsRecognized abort at
  runtime. Renamed XPU env-read call sites accordingly across
  LoadStoreOpToLLVM.cpp, DtypeConvert.cpp, XPUPrintOpToLLVM.cpp, llvm.cc.

Build artifacts (libtriton.so, FileCheck, instrumentation/*.so) are now
gitignored under third_party/xpu and excluded from the tree.

Verified: libtriton.so builds, `import triton` works, smoke test STEP 0-4 pass.
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.

3 participants