Merged
docs: ViewCopy接口新增inplaceFlag参数说明 #1129
ren-botaoAdd on 11 days ago
docs: ViewCopy接口新增inplaceFlag参数说明 #1129
Merged
ren-botaoAdd on 11 days ago
ren-botaoCollaborators
11 days ago

描述

为 ViewCopy 接口的原地场景补充文档说明:在 ViewCopy.md 中新增支持 inplaceFlag 参数的 4 参数函数原型,并说明当 x、y 构成原地关系时如何通过该标记决定是否禁用 aclnn 算子缓存;同时在 aclSetAclOpExecutorRepeatable.md 的中英文版本中同步补充说明:声明为原地场景后,同址不再影响 aclOpExecutor 复用。

关联的Issue

#587

测试

文档更新,不涉及代码

文档更新

docs/en/api/nnopbase/aclnn/aclSetAclOpExecutorRepeatable.md
docs/zh/api/nnopbase/aclnn/aclSetAclOpExecutorRepeatable.md
docs/zh/api/nnopbase/opdev/L0/ViewCopy.md

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for ren-botao's contribution.)
Rren-botaoCollaborators
11 days ago Created pull request, commit a4a941ae
atomgit-bot
atomgit-bot
11 days ago Comments:

变更摘要

本 PR 为 ViewCopy 接口的原地场景补充文档说明:在 ViewCopy.md 中新增支持 inplaceFlag 参数的 4 参数函数原型,并说明当 x、y 构成原地关系时如何通过该标记决定是否禁用 aclnn 算子缓存;同时在 aclSetAclOpExecutorRepeatable.md 的中英文版本中同步补充说明:声明为原地场景后,同址不再影响 aclOpExecutor 复用。

主要改动

  • 新增 ViewCopy 4 参数原型: 在 docs/zh/api/nnopbase/opdev/L0/ViewCopy.md 中新增 const aclTensor *ViewCopy(const aclTensor *x, const aclTensor *y, aclOpExecutor *executor, bool inplaceFlag) 原型及 inplaceFlag 参数说明,明确其为原地场景标记。
  • 明确原地关系判定与参数处理逻辑: 文档说明 x、y 构成原地关系需满足的条件(均为连续 tensor、均非 executor 分配的 workspace 数据、x->GetData() 与 y->GetData() 相等),并说明仅在此关系下识别 inplaceFlag。
  • 说明缓存行为差异: 当 inplaceFlag 为 false 或未指定时禁用 aclnn 算子缓存,为 true 时不禁用,并给出缓存 key 不含 tensor 内存地址导致同址/不同址歧义的原因。
  • 更新复用限制说明(中英文): 在 aclSetAclOpExecutorRepeatable.md 的中英文版本中补充说明:如果通过 inplaceFlag 参数(4 参数原型)声明为原地场景,则 x、y 同址不再影响 aclOpExecutor 复用。
  • 调整调用示例: ViewCopy.md 示例改用 uniqueExecutor.get() 作为 executor 参数,并新增原地场景传入 true 的 ViewCopy 调用示例。
likedislike
Incorrect?
atomgit-bot
atomgit-bot
11 days ago Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
11 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
11 days ago Comments:

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.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-cann/opbase ✅ 汤平川, 宋恺 (2/2) ✅ 汤平川 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

ren-botao, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robotCollaborators
11 days ago Set pengjiahao96,zhou-qilong,wangrui_,rxtfeng,loov1,jia0liang,zl_hw,songkai111,pingchuantang,llimwang,gubaocheng as approver
CANN-robotCANN-robotCollaborators
11 days ago Set pengjiahao96,zhou-qilong,wangrui_,rxtfeng,loov1,jia0liang,zl_hw,songkai111,pingchuantang,llimwang,gubaocheng as approver
chenjiaoCollaborators
11 days ago Comments:

/approve

likedislike
Rren-botaoCollaborators
11 days ago Modify description of pull request
Rren-botaoCollaborators
11 days ago Modify description of pull request
ren-botaoCollaborators
11 days ago Comments:

compile

likedislike
Rren-botaoCollaborators
11 days ago Pre merge succeeded (commit_id: 19fdfacb79c6f0579317eecbe1d70254e67e120e)
CANN-robot
CANN-robotCollaborators
11 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
11 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
11 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
11 days ago Added label: ci-pipeline-passed
TangPC
TangPCCollaborators
11 days ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
11 days ago Added label: approved
songkai111Collaborators
11 days ago Comments:

/lgtm

likedislike
CANN-robot
CANN-robotCollaborators
11 days ago Comments:

The following users do not have permission to comment /lgtm or /approve on any module in this PR:
/approve: 陈娇

likedislike
CANN-robotCANN-robotCollaborators
11 days ago Added label: lgtm
CANN-robotCANN-robotCollaborators
11 days ago Closed associated issue
CANN-robotCANN-robotCollaborators
11 days ago Merged pull request