Closed mglisse closed 1 year ago
The Kmin reduction replaces infinite values with the largest finite float:
Kmin
import torch from pykeops.torch import LazyTensor a=torch.tensor([1e20]) b=LazyTensor(a) c=b*b print(c.Kmin(1,dim=0)) print(c.sum_reduction(dim=0))
tensor([[3.4028e+38]]) tensor([[inf]])
We were trying to test for inf or nan to detect overflow, and this broke the detection.
I am using pykeops 1.5 with torch 1.10.0+cu113.
The
Kmin
reduction replaces infinite values with the largest finite float:We were trying to test for inf or nan to detect overflow, and this broke the detection.
I am using pykeops 1.5 with torch 1.10.0+cu113.