已关闭
[Bug-Report|缺陷反馈]: InplaceApplyAdagradDA 算子 dtype 一致性校验缺失 #4406
zhongheng创建于 7月29日关闭于 7月29日
7月29日 将 zhongheng 设为负责人
7月29日 关闭了 issue
7月29日 添加了label:resolved
7月31日 修改标题为 “[Bug-Report|缺陷反馈]: InplaceApplyAdagradDA 算子 dtype 一致性校验缺失”,原标题为“[Bug-Report|缺陷反馈]: InplaceApplyAdagradDA 算子 dtype 一致性校验缺失,对齐 CANNDEV”


Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
Describe the current behavior / 问题描述 (Mandatory / 必填)
InplaceApplyAdagradDA 算子 def.cpp 中 10 个 tensor 输入/输出的 DataType 声明为 4 元组 {DT_FLOAT, DT_FLOAT16, DT_FLOAT, DT_FLOAT16},允许 var 与其他 tensor dtype 不一致(如 var=fp32、grad=fp16)通过图编译期校验。但 kernel 模板按单一 dtype 实例化,dtype 不一致时会导致数据错乱。
对标 CANNDEV ApplyAdagradDAD(apply_adagrad_da_d.py)通过 compare_tensor_dict_key 强制 tensor dtype 一致,当前实现存在校验缺口。
另:README 声明"支持 0~8 维输入",但 CANNDEV 无此限制,文档与实现不一致。
Environment / 环境信息 (Mandatory / 必填)
Ascend950DT / CANN 9.2.0
算子路径: optim/inplace_apply_adagrad_da/
Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
Describe the expected behavior / 预期结果 (Mandatory / 必填)
def.cpp 收紧为 2 元组 {DT_FLOAT, DT_FLOAT16},框架层强制所有 tensor dtype 一致,对齐 CANNDEV。README 删除维度上限限制。
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
def.cpp L32: .DataType({ge::DT_FLOAT, ge::DT_FLOAT16, ge::DT_FLOAT, ge::DT_FLOAT16})
CANNDEV apply_adagrad_da_d.py L241-243: compare_tensor_dict_key(var, gradient_accumulator, "dtype")
Special notes for this issue/备注 (Optional / 选填)