Skip to content

[KMCompiler][Ascend] 新增 TritonToLinalgGeneric 硬件无关共享库 - #93

Open
zhongsanming wants to merge 8 commits into
flagos-ai:mainfrom
zhongsanming:ascend-linalg-split
Open

zhongsanming wants to merge 8 commits into
flagos-ai:mainfrom
zhongsanming:ascend-linalg-split

Conversation

@zhongsanming

Copy link
Copy Markdown
Contributor
  • 将 Ascend 后端中硬件无关的 Triton→Linalg 实现抽取到 FLIR 共享库 TritonToLinalgGeneric。
  • 包含:通用 elementwise/structural Op 转换、ProgramId/NumPrograms、ArgMin/ArgMax、UseAnalysis、HoistBroadcast、DevicePrintOffsetRewrite、DebugUtils。
  • UseAnalysis 通过 hook 接口支持后端专属 Op/属性(operand use、meta user、indirect 边界、后处理),不依赖 Ascend/HIVM。
  • 新增 TRITON_TO_LINALG_GENERIC_SKIP_OPS 选项,允许后端跳过 GenericOpConverter,避免与自有同名 pattern 冲突。
  • 纯新增/重构,无行为变更;由对应 FlagTree PR 接入。

Introduce TritonToLinalgGeneric with the first self-contained set of
hardware-independent patterns (precise-div, dense constant, clampf,
join/split/cat, mulhiui, precise-sqrt) for the Ascend lowering to consume.
Move make-range, splat, reshape, expand-dims, broadcast, transpose and
bitcast patterns into TritonToLinalgGeneric, with generic utilities and
a backend-installable debug-NOP hook.
Add the generic program-id/num-programs lowering and argmin/argmax
converters to TritonToLinalgGeneric, together with the generic
ReduceWithIndex helpers in GenericUtils.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant