oneDAL icon indicating copy to clipboard operation
oneDAL copied to clipboard

[enh] Add avx2 support in finiteness_checker

Open icfaust opened this issue 1 year ago • 10 comments

Description

Duplicate AVX512 functions for AVX2 by switching certain numbers to half size and changing instructions from 512 to 256 bit width. Due to the hardcoded nature of the functions, it is not easily templated out without performance loss. This implementation should improve sklearnex performance on standard benchmarks.

Changes proposed in this pull request:

  • Add avx2 finite sum check
  • Add avx2 finiteness per element check
  • Add avx2 SOA supports
  • Move final comparison of finalMask out of for loop to reduce branching in AVX512 inf/nan check.

Tasks

  • [x] Implement AVX2
  • [x] Get it to compile
  • [x] Green CI
  • [x] Run sklearnex Benchmarks

icfaust avatar Feb 20 '24 06:02 icfaust