Closed
[Documentation|文档反馈]: HistogramV2 注释中 dtype 说明与代码不一致 #3805
TangPCAdd on 28 days agoClosed at 28 days ago
28 days ago Added label: documentation
TangPC
28 days ago Comments:
28 days ago Comments:
/assign @pingchuantang


28 days ago Assign pingchuantang as responsible person
28 days ago Close issue
28 days ago Added label: resolved
一、文档链接 (必填)
二、问题文档片段 (必填)
math/histogram_v2/op_graph/histogram_v2_graph_infer.cpp第 27 行:// 修复前 // y_dtype属性指定输出类型,默认为DT_INT32(3),可设置为DT_FLOAT(9) // 修复后 // y_dtype属性指定输出类型,默认为DT_INT32(3),可设置为DT_FLOAT(0)ge::DT_FLOAT的实际枚举值为 0,原注释写为 9,与代码不一致。math/histogram_v2/op_graph/fusion_pass/histogram_fusion_pass.cpp第 26 行:// 修复前 // - is_out_dtype_int32 attr depends on x dtype (false for float/f16) // 修复后 // - y_dtype attr is selected from x dtype (DT_FLOAT for float/f16)原注释引用的
is_out_dtype_int32属性在代码中不存在,实际使用的是y_dtype属性。💡 存在的问题(选填)
HistogramV2 算子注释与实现不一致:
DT_FLOAT枚举值写错,且引用了不存在的属性名,容易误导后续维护者与使用者。相关修正见 PR。关联 PR:https://gitcode.com/cann/ops-math/pull/6494