已关闭
[Requirement|需求建议]: A5(arch35) 的 Modulate 算子 Reg 路径接口升级(Reg::DataCopy → LoadAlign/StoreAlign、__local_mem__ → __ubuf__) #5649
Nice try创建于 20 天前关闭于 20 天前
20 天前 添加了label:requirement
20 天前 将 Nice_try 设为负责人
20 天前 关闭了 issue
20 天前 添加了label:resolved
20 天前 关联了pull request:refactor(modulate): A5(arch35) Reg 加载存储接口升级为 LoadAlign/StoreAlign


Thanks for sending an requirement! Please fill in the following template to help quickly solve your problem.
Backgroud(背景信息)
社区仓库 cann/ops-nn 中 vfusion/modulate 算子在 A5(arch35,即 Ascend 950,源码按
COMPUTE_UNITS ascend950编译)侧的 Reg 实现路径(vfusion/modulate/op_kernel/arch35/modulate_regbase_common.h)仍在使用旧地址空间限定符__local_mem__与旧的 Reg 加载/存储接口Reg::DataCopy。需要将该路径升级到新的__ubuf__地址空间限定符与Reg::LoadAlign/Reg::StoreAlign接口,以适配当前接口规范。Origin(信息来源)
cann/ops-nn 仓库 PR #9990(https://gitcode.com/cann/ops-nn/pull/9990),由社区开发者提交,改动 1 个文件(vfusion/modulate/op_kernel/arch35/modulate_regbase_common.h),增删各 20 行。
Benefit / Necessity (价值/作用)
__local_mem__、Reg::DataCopy)的依赖,与新版 Reg 接口(LoadAlign/StoreAlign)及 UB 地址空间模型保持一致;Design(设计方案)
对
vfusion/modulate/op_kernel/arch35/modulate_regbase_common.h中ModulateBaseKernel的ComputeScaleShift/ComputeScale/ComputeShift三个函数做等价的接口替换:LocalTensor::GetPhyAddr()指针强转由__local_mem__ T*改为__ubuf__ T*;Reg::DataCopy<T, Reg::LoadDist::DIST_NORM>改为Reg::LoadAlign<T, Reg::LoadDist::DIST_NORM>;Reg::DataCopy<T, Reg::StoreDist::DIST_NORM>改为Reg::StoreAlign<T, Reg::StoreDist::DIST_NORM>;关联 PR:https://gitcode.com/cann/ops-nn/pull/9990