DoubangoTelecom / ultimateALPR-SDK

World's fastest ANPR / ALPR implementation for CPUs, GPUs, VPUs and NPUs using deep learning (Tensorflow, Tensorflow lite, TensorRT, OpenVX, OpenVINO). Multi-Charset (Latin, Korean, Chinese) & Multi-OS (Jetson, Android, Raspberry Pi, Linux, Windows) & Multi-Arch (ARM, x86).
https://www.doubango.org/webapps/alpr/
Other
597 stars 157 forks source link

Crash when IENV enabled on CPU without AVX2 #193

Closed DoubangoTelecom closed 2 years ago

DoubangoTelecom commented 2 years ago

Looks like it only happens on X86 machines with AVX but not AVX2. The next code isn't correct:

    if (CompVCpu::isEnabled(kCpuFlagAVX)) {
        COMPV_EXEC_IFDEF_INTRIN_X86(UltBaseIENV_Sub_32f = UltBaseIENV_Sub_32f_Intrin_AVX);
        COMPV_EXEC_IFDEF_INTRIN_X86(UltBaseIENV_Mul1_32f = UltBaseIENV_Mul1_32f_Intrin_AVX);
        COMPV_EXEC_IFDEF_INTRIN_X86(UltBaseIENV_Mul2_32f = UltBaseIENV_Mul2_32f_Intrin_AVX);
        COMPV_EXEC_IFDEF_INTRIN_X86(UltBaseIENV_Log_32f = UltBaseIENV_Log_32f_Intrin_AVX2);
        if (CompVCpu::isEnabled(kCpuFlagFMA3)) {
            COMPV_EXEC_IFDEF_INTRIN_X86(UltBaseIENV_Log_32f = UltBaseIENV_Log_32f_Intrin_FMA3_AVX2);
        }
    }
    if (CompVCpu::isEnabled(kCpuFlagAVX2)) {
        COMPV_EXEC_IFDEF_INTRIN_X86(UltBaseIENV_Pow_32f = UltBaseIENV_Pow_32f_Intrin_AVX2);
    }
DoubangoTelecom commented 2 years ago

Fixed by (v3.3.6)