heat icon indicating copy to clipboard operation
heat copied to clipboard

ht.allclose should factor in the dtype of the inputs when determining the limits

Open coquelin77 opened this issue 3 years ago • 1 comments

Feature functionality see title

Motivation When using ht.allclose with float32, we expect to have lower precision. But the current limits on ht.allclose are derived from numpy (https://numpy.org/doc/stable/reference/generated/numpy.allclose.html) which uses 64 bit numbers as default.

coquelin77 avatar Nov 09 '21 09:11 coquelin77

Hi, I m Naman Kothari a sophomore in Information Technology. I wish to work on this issue can you help me out in getting started

NamanKothari5 avatar Apr 05 '22 18:04 NamanKothari5

This is still open.

ClaudiaComito avatar Apr 27 '23 17:04 ClaudiaComito

We won't address this issue. The background is this: atol and rtol would have to be set manually for many operations anyway, the numpy defaults aren't particularly related to 64-bit precision (otherwise they would be much lower), and the numpy defaults are identical to the torch defaults.

ht.allclose will stick to the numpy defaults, deviations will have to be addressed in single test functions like we have been doing so far.

Thanks @Sai-Suraj-27 for looking into this.

ClaudiaComito avatar Sep 18 '23 03:09 ClaudiaComito