Xpu cleanup 20250625#717
Open
dongjibin1996 wants to merge 3 commits into
Open
Conversation
zhzhcookie
reviewed
Jun 26, 2026
Collaborator
There was a problem hiding this comment.
Please do not commit this file.
zhzhcookie
reviewed
Jun 26, 2026
Collaborator
There was a problem hiding this comment.
Please do not change this file.
8247b95 to
2c2ce5d
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.