Skip to content
Commit a6f7675a authored by TatWai Chong's avatar TatWai Chong Committed by Eric Kunze
Browse files

Fix incorrect special fp number handling in min/max reduction



Neither Eigen nor c++ stdlib have well defined min/max handling to match
Tosa spec and frameworks such as TF. for instance:
  reduce_min([4, float('nan')]) -> float('nan')
  reduce_min([float('nan'), float('nan')]) -> float('nan')
  reduce_min([float('-inf'), float('inf')]) -> float('-inf')

This patch creates custom floating point reducer for min/max, and create
framework tests to verify special floating point min/max reduction.

Co-authored-by: default avatarEirini Vlassi Pandi <eirini.vlassipandi@arm.com>

Change-Id: If59d3ebd937ce46615a8da35a535338a94be1d3f
Signed-off-by: TatWai Chong's avatarTatWai Chong <tatwai.chong@arm.com>
parent 2719759b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment