Simd icon indicating copy to clipboard operation
Simd copied to clipboard

Feature ideas

Open s-trinh opened this issue 3 years ago • 1 comments

Some ideas, on top of my head.

Simd modules

We are using Simd to accelerate some core image processing functions (e.g. color conversion, image resizing, ...) because:

  • it is highly optimized,
  • it provides fallback to regular code,
  • it is optimized for x86 and ARM, the architectures we are considering.

What would be great:

  • to be able to customize the building of the Simd lib:
    • that is, using CMake (what we are using),
    • be able to disable the build of AVX-512 (I believe is still marginal for regular CPU and reduces the CPU frequency to avoid overheating?)
    • be able to only enable certain modules, e.g. color conversion, image resizing, ... to avoid long build time and big library size
  • to have a better files architecture, something like:
src
    Simd
        Color conversion
            ARM
            x86
            [...]
        Image resize
            ARM
            x86
            [...]
        [...]
  • to essentially avoid long files structure

Other ideas

  • automatically remove trailing whitespaces before commiting (e.g. using something like Github pre-commit hook?)
  • automatic testing using Github actions?

s-trinh avatar Mar 28 '22 07:03 s-trinh

Hi! Thank you for your suggestions.

I want to note that there are several cmake options in prj/cmake/CMakeLists.txt which can reduce compilation time:

option(SIMD_AVX512 "AVX-512 (AVX-512F, AVX-512CD, AVX-512VL, AVX-512DQ, AVX-512BW) enable" ON)
option(SIMD_AVX512VNNI "AVX-512-VNNI enable" ON)
option(SIMD_TEST "Test framework enable" ON)
option(SIMD_SYNET "Synet optimizations enable" ON)
option(SIMD_INT8_DEBUG "Synet INT8 debug enable" OFF)

I would recommend to switch off them and you will see radical reducing of compilation time!

As to changing of project structure I have simular plans but them have low prority.

ermig1979 avatar Mar 28 '22 07:03 ermig1979