Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
Open Source
>
AI/ML
>
Machine Learning/Deep Learning
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
69
Star
300
Fork
182
MindSpore
/
akg
Code
Issues
17
Pull Requests
39
Wiki
Insights
Pipelines
Service
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
[AIKG] 支持Triton代码作为AIKG输入任务
TODO
#ICWCIY
RFC
Yanzhi_YI
member
Opened this issue
2025-09-04 14:38
| name | about | labels | | ---- | ---------------------------------------------------- | -------------------------------- | | RFC| 支持Triton代码作为AIKG输入任务 | kind/feature | ### Backgroud(背景信息) AIKG当前支持的输入任务主要是KernelBench类的算子组合Model。通过调用Model、get_inputs、get_init_inputs来执行任务代码。 ```python class Model(nn.Cell): def __init__(self): super(Model, self).__init__() def construct(self, A: ms.Tensor, B: ms.Tensor) -> ms.Tensor: return ms.ops.matmul(A, B) M = 1024 K = 4096 N = 2048 def get_inputs(): A = ms.ops.randn(M, K, dtype=ms.float16) B = ms.ops.randn(K, N, dtype=ms.float16) return [A, B] def get_init_inputs(): return [] # No special initialization inputs needed ``` 但实际的算子生成、优化任务并不一定只有这种场景:例如还有针对已有生成代码继续优化的场景。 例如:算子任务是一个已生成的triton代码,但是希望通过AIKG继续优化该算子的性能。本RPC希望支持此类“继续优化”的场景。 ### Benefit / Necessity (价值/作用) - 在Triton-ascend/cuda里,存在不少手写的、未被优化的算子实现,这类实现可通过AIKG持续优化 - 在inductor直接生成的Triton代码里,可能是一个通用版本,通过AIKG可尝试接入优化 ### Design(设计方案) 简要方案分析 **方案一** TrionOld当做 TaskDesc 接通AIKG任务。 优点:接入相对简单; 不足:可能原来的TritonOld写法未必是最优方案,基于该方案的优化可能过早陷入局部最优。 **方案二** 还原算子组合再跑AIKG。 优点:从最基础的算子组合出发,便于探索更多可能;还原之后可无缝衔接原AIKG流程。 不足:还原后成需额外验证,确保正确性。
| name | about | labels | | ---- | ---------------------------------------------------- | -------------------------------- | | RFC| 支持Triton代码作为AIKG输入任务 | kind/feature | ### Backgroud(背景信息) AIKG当前支持的输入任务主要是KernelBench类的算子组合Model。通过调用Model、get_inputs、get_init_inputs来执行任务代码。 ```python class Model(nn.Cell): def __init__(self): super(Model, self).__init__() def construct(self, A: ms.Tensor, B: ms.Tensor) -> ms.Tensor: return ms.ops.matmul(A, B) M = 1024 K = 4096 N = 2048 def get_inputs(): A = ms.ops.randn(M, K, dtype=ms.float16) B = ms.ops.randn(K, N, dtype=ms.float16) return [A, B] def get_init_inputs(): return [] # No special initialization inputs needed ``` 但实际的算子生成、优化任务并不一定只有这种场景:例如还有针对已有生成代码继续优化的场景。 例如:算子任务是一个已生成的triton代码,但是希望通过AIKG继续优化该算子的性能。本RPC希望支持此类“继续优化”的场景。 ### Benefit / Necessity (价值/作用) - 在Triton-ascend/cuda里,存在不少手写的、未被优化的算子实现,这类实现可通过AIKG持续优化 - 在inductor直接生成的Triton代码里,可能是一个通用版本,通过AIKG可尝试接入优化 ### Design(设计方案) 简要方案分析 **方案一** TrionOld当做 TaskDesc 接通AIKG任务。 优点:接入相对简单; 不足:可能原来的TritonOld写法未必是最优方案,基于该方案的优化可能过早陷入局部最优。 **方案二** 还原算子组合再跑AIKG。 优点:从最基础的算子组合出发,便于探索更多可能;还原之后可无缝衔接原AIKG流程。 不足:还原后成需额外验证,确保正确性。
Comments (
2
)
Sign in
to comment
Status
TODO
VALIDATION
CLOSED
TODO
ACCEPTED
WIP
DONE
REJECTED
Assignees
Not set
Labels
Not set
Projects
Unprojected
Unprojected
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (17)
Tags (11)
master
br_aikg
ms_custom_ops
ms_custom_ops_0902_br_infer_iter
code_clean
r2.4
r2.2
r2.3
r2.1
r2.0
r1.9
r1.8
r1.7
r1.6
r1.3
r1.5
r1.2
v2.4.0
v2.1.0
v2.0.0
v1.9.0
v1.8.0
v1.7.0
v1.6.0
v1.5.0
v1.4.0
v1.3.0
v1.2.0
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
Duration
(hours)
参与者(1)
Python
1
https://gitee.com/mindspore/akg.git
git@gitee.com:mindspore/akg.git
mindspore
akg
akg
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register