Add KernelSwift portable compiler and backend support for T1-T4 - #215
Open
chenweihan02 wants to merge 5 commits into
Open
Add KernelSwift portable compiler and backend support for T1-T4#215chenweihan02 wants to merge 5 commits into
chenweihan02 wants to merge 5 commits into
Conversation
Lower application blocks, gather operations, static layouts, tensor strides, and scalar arguments through the shared SSA pipeline Legalize Triton launch candidates across vendor targets and cache prevalidated no-alias invocation plans while preserving runtime rebinding Cover static layout bounds, scalar emission, stride contracts, and runtime planning with focused regression tests
Lower bitcast, interleave, and transpose operations through the frontend SSA and target emitters without introducing platform-specific operator semantics Bind compiled Triton specializations for stable validated arguments while refreshing the current stream on every invocation Add regression coverage for transform typing, emitter spelling, stride guards, and direct compiled launches
Add a target hook that converts FP8 block-dot operands only when the active Triton toolchain cannot compile the native operation Select BF16 for CoreX and FP16 for DTK from toolchain capabilities while supporting explicit backend overrides and stable compilation cache keys Cover automatic selection, explicit fallback, invalid options, generated source, and numerical execution with dedicated regression tests
Sink masked-store producers into bounds guards and preserve result dtypes for mixed conditional branches Cache validated tensor pointers and scalar arguments for CUDA launches while querying the current stream on every invocation Support configured CoreX Clang discovery without changing explicit NVCC flows and add focused lowering, toolchain, and runtime tests
Propagate the jagged dimension into runtime tensor specifications Skip dense source-stride comparison for NestedTensor public values because their storage strides differ from the logical strides used by jagged indexing Keep dense tensor stride validation unchanged and add regression coverage for both contracts
chenweihan02
marked this pull request as ready for review
August 31, 2026 05:34
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.
KernelSwift 算子创新大赛
概述
本 PR 为 KernelSwift 算子创新大赛 T1-T4 提供共用的 NineToothed SSA、Triton/CUDA lowering 和运行时能力。
通用分析与变换位于 frontend、SSA emitter 和 runtime 层;只有工具链探测、FP8 operand 合法化以及 CUDA/CoreX launch 等硬件相关能力位于目标后端。算子实现及数学语义由关联的
ntopsPR 提供。b77f9306b79203主要修改
通用 SSA 与 frontend
bitcast、interleave和 transpose 的统一 lowering。Triton/CUDA 后端与运行时
赛题对应关系
18c50cd、5b6abe84ea752e18c50cd、5b6abe80dbe0e96b79203架构边界
本 PR 不包含 T1-T4 的算子源码,不修改算子接口或数学语义,也不读取 benchmark case 标识或隐藏数据。可跨平台、跨算子复用的能力位于通用 SSA/frontend/runtime 层,平台后端只保留确实依赖工具链或硬件能力的实现。
测试结果
pytestoutput:以上结果为各赛题一键评测脚本选择的相关编译器回归测试。算子正确性、性能结果、测试命令和复现环境记录在关联的
ntopsPR 中。关联 PR 与复现材料
ntops算子 PR:InfiniTensor/ntops#105ntops算子分支:kernelswift-competition-operators本 PR 与关联
ntopsPR 共同构成统一 A+B 参赛作品。