Closed
[Bug-Report|缺陷反馈]: SIMT混合场景下,开启-O0编译选项 math_constants.h 浮点常量宏 reinterpret_cast 实现触发编译错误 #1986
ruoshuisixueAdd on  22 days agoClosed at  17 days ago
ruoshuisixue
ruoshuisixueCollaborators
22 days ago Create

Describe the current behavior / 问题描述 (Mandatory / 必填)

SIMT混合场景下,开启-O0编译选项 math_constants.h 浮点常量宏 reinterpret_cast 触发编译错误

Environment / 环境信息 (Mandatory / 必填)

CANN版本:9.3

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

SIMT混合场景下,开启-O0编译选项, 指针类型重解释不被支持/受限,而该宏实现直接对整型常量地址做 reinterpret_cast<const
float*> 后解引用

Describe the expected behavior / 预期结果 (Mandatory / 必填)

SIMT混合场景下,开启-O0编译选项,正常编译,精度正常

image.png

Special notes for this issue/备注 (Optional / 选填)

likedislike
ruoshuisixueruoshuisixueCollaborators
22 days ago Added label: bug-report
ruoshuisixueruoshuisixueCollaborators
17 days ago changed custom state from 待办的 to 已完成
ruoshuisixueruoshuisixueCollaborators
17 days ago Close issue
CANN-robotCANN-robotCollaborators
17 days ago Added label: resolved