2026-04-10 16:19:41 [INFO] Core operator results run in simulator as follow:
core_name duration_time(us) running_time(us)
core2.veccore1 12.2 11.31
y_tri: tensor([[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
...,
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.]], device='npu:0', dtype=torch.float16)
y_ref: tensor([[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
...,
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.]], device='npu:0', dtype=torch.float16,
grad_fn=<NativeLayerNormBackward0>)
Layer Normalization 128,128 torch.float16 PASSED!
2026-04-10 16:19:41 [INFO] Core operator results run in simulator as follow: core_name duration_time(us) running_time(us) core2.veccore1 12.2 11.31 y_tri: tensor([[0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], ..., [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.]], device='npu:0', dtype=torch.float16) y_ref: tensor([[0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], ..., [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.]], device='npu:0', dtype=torch.float16, grad_fn=<NativeLayerNormBackward0>) Layer Normalization 128,128 torch.float16 PASSED!因为输出的全是0,实际上应该是比较随机的数字才对。msprof op运行时输出就正常。
那问题就是:是什么原因导致这种差异呢?msprof op是上板运行,msprof op simulator是仿真,是不上板而是用CPU仿真NPU运行吧?那造成这个问题是不是仿真功能的问题导致的呢?