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

signal: fix memory access #3620

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

opencv-alalek
Copy link

@opencv-alalek opencv-alalek commented Jan 15, 2024

fixup #3613

failed weekly validation:

Caused by memory access errors in AVX mode.

Perf report:

Name of Test scalar base SSE42 base Scalar PATCH SSE42 PATCH AVX2 PATCH
resample_sin_signal::TestResampleFunc::(1234, 16000, 16000) 0.000 0.000 0.000 0.000 0.000
resample_sin_signal::TestResampleFunc::(1234, 16000, 32000) 0.043 0.047 0.044 0.043 0.032
resample_sin_signal::TestResampleFunc::(1234, 16000, 44100) 0.055 0.054 0.052 0.052 0.035
resample_sin_signal::TestResampleFunc::(1234, 16000, 48000) 0.057 0.055 0.054 0.052 0.037
resample_sin_signal::TestResampleFunc::(1234, 32000, 16000) 0.036 0.028 0.003 0.003 0.001
resample_sin_signal::TestResampleFunc::(1234, 32000, 32000) 0.000 0.000 0.000 0.000 0.000
resample_sin_signal::TestResampleFunc::(1234, 32000, 44100) 0.039 0.062 0.038 0.038 0.030
resample_sin_signal::TestResampleFunc::(1234, 32000, 48000) 0.043 0.041 0.038 0.040 0.030
resample_sin_signal::TestResampleFunc::(1234, 44100, 16000) 0.032 0.027 0.002 0.002 0.001
resample_sin_signal::TestResampleFunc::(1234, 44100, 32000) 0.039 0.033 0.032 0.032 0.027
resample_sin_signal::TestResampleFunc::(1234, 44100, 44100) 0.000 0.000 0.000 0.000 0.000
resample_sin_signal::TestResampleFunc::(1234, 44100, 48000) 0.046 0.037 0.036 0.035 0.028
resample_sin_signal::TestResampleFunc::(1234, 48000, 16000) 0.026 0.027 0.002 0.002 0.001
resample_sin_signal::TestResampleFunc::(1234, 48000, 32000) 0.031 0.033 0.033 0.031 0.027
resample_sin_signal::TestResampleFunc::(1234, 48000, 44100) 0.034 0.035 0.034 0.034 0.028
resample_sin_signal::TestResampleFunc::(1234, 48000, 48000) 0.000 0.000 0.000 0.000 0.000
resample_sin_signal::TestResampleFunc::(12345, 16000, 16000) 0.001 0.001 0.001 0.001 0.001
resample_sin_signal::TestResampleFunc::(12345, 16000, 32000) 0.259 0.259 0.246 0.230 0.126
resample_sin_signal::TestResampleFunc::(12345, 16000, 44100) 0.339 0.353 0.338 0.326 0.172
resample_sin_signal::TestResampleFunc::(12345, 16000, 48000) 0.380 0.384 0.365 0.357 0.187
resample_sin_signal::TestResampleFunc::(12345, 32000, 16000) 0.058 0.058 0.032 0.032 0.011
resample_sin_signal::TestResampleFunc::(12345, 32000, 32000) 0.001 0.001 0.001 0.001 0.001
resample_sin_signal::TestResampleFunc::(12345, 32000, 44100) 0.170 0.177 0.164 0.155 0.083
resample_sin_signal::TestResampleFunc::(12345, 32000, 48000) 0.190 0.190 0.176 0.168 0.088
resample_sin_signal::TestResampleFunc::(12345, 44100, 16000) 0.050 0.050 0.023 0.023 0.008
resample_sin_signal::TestResampleFunc::(12345, 44100, 32000) 0.107 0.107 0.098 0.096 0.057
resample_sin_signal::TestResampleFunc::(12345, 44100, 44100) 0.001 0.001 0.001 0.001 0.001
resample_sin_signal::TestResampleFunc::(12345, 44100, 48000) 0.146 0.146 0.135 0.133 0.073
resample_sin_signal::TestResampleFunc::(12345, 48000, 16000) 0.049 0.049 0.021 0.021 0.008
resample_sin_signal::TestResampleFunc::(12345, 48000, 32000) 0.101 0.101 0.092 0.090 0.055
resample_sin_signal::TestResampleFunc::(12345, 48000, 44100) 0.128 0.128 0.118 0.115 0.063
resample_sin_signal::TestResampleFunc::(12345, 48000, 48000) 0.001 0.001 0.001 0.001 0.001
resample_sin_signal::TestResampleFunc::(123456, 16000, 16000) 0.010 0.008 0.009 0.009 0.009
resample_sin_signal::TestResampleFunc::(123456, 16000, 32000) 2.274 2.272 2.067 2.002 0.901
resample_sin_signal::TestResampleFunc::(123456, 16000, 44100) 3.108 3.095 2.844 2.766 1.234
resample_sin_signal::TestResampleFunc::(123456, 16000, 48000) 3.699 3.830 3.656 3.480 1.942
resample_sin_signal::TestResampleFunc::(123456, 32000, 16000) 0.353 0.338 0.321 0.320 0.113
resample_sin_signal::TestResampleFunc::(123456, 32000, 32000) 0.009 0.008 0.009 0.009 0.009
resample_sin_signal::TestResampleFunc::(123456, 32000, 44100) 1.514 1.456 1.433 1.390 0.628
resample_sin_signal::TestResampleFunc::(123456, 32000, 48000) 1.661 1.577 1.556 1.507 0.684
resample_sin_signal::TestResampleFunc::(123456, 44100, 16000) 0.268 0.280 0.233 0.233 0.082
resample_sin_signal::TestResampleFunc::(123456, 44100, 32000) 0.813 0.843 0.763 0.741 0.339
resample_sin_signal::TestResampleFunc::(123456, 44100, 44100) 0.009 0.009 0.008 0.009 0.009
resample_sin_signal::TestResampleFunc::(123456, 44100, 48000) 1.145 1.185 1.091 1.103 0.500
resample_sin_signal::TestResampleFunc::(123456, 48000, 16000) 0.253 0.253 0.205 0.214 0.075
resample_sin_signal::TestResampleFunc::(123456, 48000, 32000) 0.752 0.722 0.677 0.683 0.326
resample_sin_signal::TestResampleFunc::(123456, 48000, 44100) 1.010 1.015 0.961 0.934 0.423
resample_sin_signal::TestResampleFunc::(123456, 48000, 48000) 0.009 0.009 0.009 0.009 0.009
resample_sin_signal::TestResampleFunc::(1234567, 16000, 16000) 0.167 0.163 0.157 0.163 0.157
resample_sin_signal::TestResampleFunc::(1234567, 16000, 32000) 23.313 23.287 20.064 20.249 9.208
resample_sin_signal::TestResampleFunc::(1234567, 16000, 44100) 32.068 32.063 27.914 28.159 12.996
resample_sin_signal::TestResampleFunc::(1234567, 16000, 48000) 38.100 38.339 36.686 37.184 20.452
resample_sin_signal::TestResampleFunc::(1234567, 32000, 16000) 3.183 3.183 3.087 3.208 1.136
resample_sin_signal::TestResampleFunc::(1234567, 32000, 32000) 0.156 0.156 0.157 0.163 0.157
resample_sin_signal::TestResampleFunc::(1234567, 32000, 44100) 14.817 14.790 13.699 13.876 6.200
resample_sin_signal::TestResampleFunc::(1234567, 32000, 48000) 16.876 16.181 14.920 15.097 6.734
resample_sin_signal::TestResampleFunc::(1234567, 44100, 16000) 2.481 2.483 2.329 2.287 0.856
resample_sin_signal::TestResampleFunc::(1234567, 44100, 32000) 8.065 7.940 7.454 7.294 3.358
resample_sin_signal::TestResampleFunc::(1234567, 44100, 44100) 0.156 0.163 0.157 0.157 0.156
resample_sin_signal::TestResampleFunc::(1234567, 44100, 48000) 11.800 11.863 10.821 10.891 4.855
resample_sin_signal::TestResampleFunc::(1234567, 48000, 16000) 2.420 2.421 2.138 2.137 0.765
resample_sin_signal::TestResampleFunc::(1234567, 48000, 32000) 7.267 7.424 6.831 6.698 2.956
resample_sin_signal::TestResampleFunc::(1234567, 48000, 44100) 9.975 9.968 9.158 8.988 4.122
resample_sin_signal::TestResampleFunc::(1234567, 48000, 48000) 0.157 0.157 0.163 0.164 0.163
resample_sin_signal::TestResampleFunc::(12345678, 16000, 16000) 1.859 2.108 1.855 2.120 2.123
resample_sin_signal::TestResampleFunc::(12345678, 16000, 32000) 273.751 263.925 239.120 233.167 138.162
resample_sin_signal::TestResampleFunc::(12345678, 16000, 44100) 371.474 365.184 329.526 320.987 190.407
resample_sin_signal::TestResampleFunc::(12345678, 16000, 48000) 402.836 402.261 369.109 363.213 207.446
resample_sin_signal::TestResampleFunc::(12345678, 32000, 16000) 40.975 40.527 29.880 29.552 11.333
resample_sin_signal::TestResampleFunc::(12345678, 32000, 32000) 1.853 2.107 1.870 2.105 2.100
resample_sin_signal::TestResampleFunc::(12345678, 32000, 44100) 194.307 191.006 165.158 162.613 94.648
resample_sin_signal::TestResampleFunc::(12345678, 32000, 48000) 209.484 202.622 179.942 181.200 102.773
resample_sin_signal::TestResampleFunc::(12345678, 44100, 16000) 33.829 33.778 22.042 21.450 8.263
resample_sin_signal::TestResampleFunc::(12345678, 44100, 32000) 109.970 111.001 88.783 84.831 50.410
resample_sin_signal::TestResampleFunc::(12345678, 44100, 44100) 1.852 2.109 1.848 2.124 2.116
resample_sin_signal::TestResampleFunc::(12345678, 44100, 48000) 159.940 155.456 132.558 127.770 75.206
resample_sin_signal::TestResampleFunc::(12345678, 48000, 16000) 33.621 32.356 19.788 19.706 7.316
resample_sin_signal::TestResampleFunc::(12345678, 48000, 32000) 99.478 94.011 78.643 77.825 45.481
resample_sin_signal::TestResampleFunc::(12345678, 48000, 44100) 137.322 135.361 108.514 107.689 63.354
resample_sin_signal::TestResampleFunc::(12345678, 48000, 48000) 1.795 2.048 1.837 2.047 2.048

@asmorkalov asmorkalov merged commit 9d733ef into opencv:4.x Jan 17, 2024
9 of 10 checks passed
@asmorkalov asmorkalov mentioned this pull request Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants