Currently, CPU mode can give an error but it's not consistent (segfaults can happen before). GPU will silently corrupt memory if the nlist overflows. We should definitely modulo the size at least to prevent this. We can also unifying reporting by using a TF debugging assertion which will work on GPU/CPU.
193 adds the warning, but there is a new problem that the main thread doesn't cleanly exit if an error is raised during TF execution (which is how the nlist overflow error arises).
Currently, CPU mode can give an error but it's not consistent (segfaults can happen before). GPU will silently corrupt memory if the nlist overflows. We should definitely modulo the size at least to prevent this. We can also unifying reporting by using a TF debugging assertion which will work on GPU/CPU.