Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM下的精度问题 #61

Open
z-learner opened this issue Jun 30, 2024 · 2 comments
Open

ARM下的精度问题 #61

z-learner opened this issue Jun 30, 2024 · 2 comments

Comments

@z-learner
Copy link

z-learner commented Jun 30, 2024

我在代码中加入了ARM的编译选项,发现 softmax 测试(其余的测试都可以过)一直因为精度问题过不了,但是里面的实现已经是 std::exp 的实现了,还没有开始增加NEON相关的支持,想问下这里的真值是怎么产生的?

代码 : 95b8c8b

/root/Documents/code/KuiperInfer/test/test_layer/test_softmax.cpp:59: Failure
Expected: (std::abs(a - b)) <= (1e-5f), actual: 0.000335352495 vs 1e-05
a: 0.018315639346837997 b: 0.017980286851525307

[  FAILED  ] test_layer.forward_softmax_dim1 (22 ms)
[ RUN      ] test_layer.forward_softmax_dim1_minus2
/root/Documents/code/KuiperInfer/test/test_layer/test_softmax.cpp:94: Failure
Expected: (std::abs(a - b)) <= (1e-5f), actual: 0.000335352495 vs 1e-05
a: 0.018315639346837997 b: 0.017980286851525307 i:4

[  FAILED  ] test_layer.forward_softmax_dim1_minus2 (8 ms)
[ RUN      ] test_layer.forward_softmax_dim0
[       OK ] test_layer.forward_softmax_dim0 (29 ms)
[ RUN      ] test_layer.forward_softmax_dim2
/root/Documents/code/KuiperInfer/test/test_layer/test_softmax.cpp:159: Failure
Expected: (std::abs(a - b)) <= (1e-5f), actual: 0.0177284628 vs 1e-05
a: 0.049787066876888275 b: 0.032058604061603546 i:0
@Gooddz1
Copy link

Gooddz1 commented Aug 7, 2024

请问怎么在代码中加入了ARM的编译选项,可以分享一下相应的代码吗?

@z-learner
Copy link
Author

可以看下这个 commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants