- Delete invoke param offset


Pull Request has been successfully merged by CANN-robot.
(Thank you for Hujun's contribution.)Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-cann/pypto | ✅ dai-zhentao, codehjp423 (2/2) | ✅ dai-zhentao (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
cam_bxh, thanks for your pull request. All authors of the commits have signed the CLA. 👍


/compile


流水线任务触发成功
任务链接 [691a4820707f42e7afe3732c1b07c42d][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ✅ SUCCESS | >>>>> | >>>>> |
[2026-06-22 15:39:32] CI执行结束


流水线任务触发成功
任务链接 [d3b79ed868e74f09bfa65509fd283260][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| get_pr_file | ✅ SUCCESS | ||
| static-check | ✅ SUCCESS | ||
| compile | ❌ FAILED |


变更摘要
此 PR 主要聚焦于从 codegen 系统中删除 invoke param offset 机制。具体包括:移除 InvokeParaOffset 结构体、从 GenCode 方法及其整个继承体系中删除 invokeParaOffset 参数、删除 GenRealizeIdMap 函数、从上下文结构体(CodeGenOpCtx、CodeGenOpNPUCtx、GenOpCodeOptions)中移除 locToOffset/lto/paramLocToParamListOffset 字段,并同步更新所有调用点及测试文件。
主要改动
- 删除
InvokeParaOffset结构体: 从framework/src/interface/machine/host/machine_task.h中完全移除该结构体及其所有成员字段和LogRawTensorInfo方法,同时移除了codegen.h和codegen_cce.h中对其头文件的依赖。 - 简化
GenCode接口: 将CodeGen::GenCode、CodeGenCCE::GenCode、CodeGenNPU::GenCode、CodeGenLiteNPU::GenCode的签名从接受两个参数(Function&和invokeParaOffsetmap)简化为仅接受Function&一个参数。 - 删除
GenRealizeIdMap函数: 从codegen_cce.cpp中删除此函数及其在codegen_cce.h中的声明,并从codegen_cloudnpu.cpp和codegen_litenpu.cpp的GenFuncBody中移除相关调用。 - 清理
CodeGenOpCtx/CodeGenOpNPUCtx构造函数: 移除locToOffset/lto参数,简化上下文结构体构造——CodeGenOpCloudNPU和CodeGenOpLiteNPU的创建不再需要传递此映射。 - 移除
CodeGenOp中的paramLocToParamListOffset字段: 从codegen_op.h中删除该成员,CodeGenOp子类不再持有 invoke param offset 引用。 - 更新所有调用点与测试文件: 在
backend.cpp、main_block.cpp、test_codegen_utils.cpp及 40+ 个测试文件中,统一将codeGen.GenCode(*function, {})替换为codeGen.GenCode(*function),并移除GenOpCodeOptions::lto的使用。


/compile


流水线任务触发成功
任务链接 [1ba313361f484b879b120779975a1fbf][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_Py3_ninja_simulation | ✅ SUCCESS | ||
| UT_Test_Py3_ninja | ✅ SUCCESS | ||
| UT_Test_Cpp_make_clang | ✅ SUCCESS | ||
| UT_Test_Cpp_make_gnu | ✅ SUCCESS | ||
| UT_Test_Cpp_make_gnu_part_1 | ✅ SUCCESS | ||
| UT_Test_Cpp_make_gnu_part_2 | ✅ SUCCESS | ||
| UT_Test_Cpp_make_gnu_part_3 | ✅ SUCCESS | ||
| UT_Test_report | ✅ SUCCESS | >>>>> | |
| PreSmoke_A900 | ❌ FAILED | >>>>> |


流水线任务触发成功
任务链接 [31eb01f424c645bcbce48f04ec0de764][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ✅ SUCCESS | >>>>> | >>>>> |
[2026-06-22 16:46:50] CI执行结束


流水线任务触发成功
任务链接 [23450ae16bc7485d92c477ebc1b2fe9b][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| get_pr_file | ✅ SUCCESS | ||
| static-check | ✅ SUCCESS | ||
| compile | ❌ FAILED |


流水线任务触发成功
任务链接 [066599eba683449f9a599efc81071913][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_Py3_ninja_simulation | ✅ SUCCESS | ||
| UT_Test_Py3_ninja | ✅ SUCCESS | ||
| UT_Test_Cpp_make_clang | ✅ SUCCESS | ||
| UT_Test_Cpp_make_gnu | ✅ SUCCESS | ||
| UT_Test_Cpp_make_gnu_part_1 | ✅ SUCCESS | ||
| UT_Test_Cpp_make_gnu_part_2 | ✅ SUCCESS | ||
| UT_Test_Cpp_make_gnu_part_3 | ✅ SUCCESS | ||
| UT_Test_report | ✅ SUCCESS | >>>>> | |
| PreSmoke_A900 | ❌ FAILED | >>>>> |


流水线任务触发成功
任务链接 [23450ae16bc7485d92c477ebc1b2fe9b][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| get_pr_file | ✅ SUCCESS | ||
| static-check | ✅ SUCCESS | ||
| compile | ❌ FAILED |


流水线任务触发成功
任务链接 [42ff0e658fb84c328b7c87248b39b6bd][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_Py3_ninja_simulation | ✅ SUCCESS | ||
| UT_Test_Py3_ninja | ✅ SUCCESS | ||
| UT_Test_Cpp_make_clang | ✅ SUCCESS | ||
| UT_Test_Cpp_make_gnu | ✅ SUCCESS | ||
| UT_Test_Cpp_make_gnu_part_1 | ✅ SUCCESS | ||
| UT_Test_Cpp_make_gnu_part_2 | ✅ SUCCESS | ||
| UT_Test_Cpp_make_gnu_part_3 | ✅ SUCCESS | ||
| UT_Test_report | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS |
[2026-06-23 11:06:09] CI执行结束


流水线任务触发成功
任务链接 [23450ae16bc7485d92c477ebc1b2fe9b][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| get_pr_file | ✅ SUCCESS | ||
| static-check | ✅ SUCCESS | ||
| compile | ✅ SUCCESS |
[2026-06-23 11:06:51] CI执行结束


/approve


/lgtm

