Closed
[Requirement|需求建议]: CodeGen支持IDE从计算图跳转kernel代码 #1060
HujunAdd on  Apr 1Closed at  Apr 2
Hujun
HujunCollaborators
Apr 1 Create

Thanks for sending an requirement! Please fill in the following template to help quickly solve your problem.

Background(背景信息)

IDE通过点击计算图中的OP节点跳转到对应kernel代码中TileOp调用点

Origin(信息来源)

DFX可维可测提升,IDE工具

Benefit / Necessity(价值/作用)

将计算图直接关联到kernel代码,方便用户查看

Design(设计方案)

思路:
由于每个子图内的每个OP的opMagic唯一,故使用opMagic作为建立关联关系的共同键值

初步方案:

  1. 在每个TileOp生成的最后,增加opMagic字段值,样例如下:
TLoad(ubTensor_0, gmTensor_1, Coord2Dim(0, 0)); // [opMagic:10004]
  1. IDE工具通过在图上找到opMagic字段值后,在kernel代码中以固定格式找到这个TileOp注释中使用该opMagic的所在行
  2. 该特性受compile_debug_mode控制,mode为1时,该特性需要在mode值为1情况下使能
likedislike
HujunHujunCollaborators
Apr 1 Associated milestone: 0.2.1
HujunHujunCollaborators
Apr 1 Added label: CodeGenrequirement
HujunHujunCollaborators
Apr 1 Associated pull request
HujunHujunCollaborators
Apr 1 Modify description of issue
HujunHujunCollaborators
Apr 1 Modify description of issue
HujunHujunCollaborators
Apr 2 Modify description of issue
CANN-robotCANN-robotCollaborators
Apr 2 Close issue
CANN-robotCANN-robotCollaborators
Apr 2 Added label: resolved