getkeops / keops

KErnel OPerationS, on CPUs and GPUs, with autodiff and without memory overflows
https://www.kernel-operations.io
MIT License
1.04k stars 65 forks source link

Do not include exact ranges in cache argument, but only their presence #309

Closed Turakar closed 10 months ago

Turakar commented 1 year ago

The previous version passed the whole ranges version down to the cache implementation, which lead to the calculation of the str representation of the associated tensors, which is highly inefficient (i.a., it calls tolist()). Now, we only pass a boolean indicating whether we have ranges or not, which is already the default for the batch case.

joanglaunes commented 10 months ago

Hello @Turakar , Thank you for your input and sorry for answering you so long after. Actually it is a pity that we did not look at your PR when you sent it, because the fact that we were passing the whole ranges variable was not at all intended (it was a mistake about the behavior of Python "or" operation), and actually it was causing bugs which looked completely unrelated (see issue #342).

Turakar commented 10 months ago

Yeah, seems like we independently fixed this issue ^^ No problem for me, and thank you for your response.