oneDAL icon indicating copy to clipboard operation
oneDAL copied to clipboard

[enh] add functors for infinite and NaN checking in DAL

Open icfaust opened this issue 1 year ago • 3 comments

Description

Fast finite value checking is currently only implemented in the daal backend via data_management/finiteness_checker. Fast finite checks for data on GPU needs to be implemented and are fastest via GPU reductions, ideally following strategies laid out in this document: https://www.intel.com/content/www/us/en/docs/oneapi/optimization-guide-gpu/2024-0/reduction.html . To do so requires first making functors which can do the necessary operations on the data.

Finite checks follow two steps: First checking the value of the sum of the data, and whether it is infinite or NaN. If infinite, checks the values individually to see if one specific element is infinite or Nan.

These new functors are for the second step, as the first is inherently available via the sum and identity functors.

Suggestions are highly recommended.

Changes proposed in this pull request:

  • Add isinfornan functor
  • Add isinf functor
  • Add logical_or functor

Tasks

  • [x] implement functors
  • [ ] compile
  • [ ] Green CI

icfaust avatar Feb 20 '24 14:02 icfaust