New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behaviour: elt(T) doesn't raise out-of range error #416
Comments
Does it throw an error if you run in debug mode? |
I had the same question – more information on compiling and running in debug mode here: |
Hi, so I gave a try in debug mode, and looks like it's still working fine?? 🤔 Here is one simple example, a 2 by 2 random tensor, and I ask for T(10, 10), which obviously is nonsense
and still, I got a zero with no error messages. Here is what gbd returned to me
p.s. I ran this in |
Hi there, I did a more detailed check, and I think this is actually kind of overflow issue? It seems like
outputs:
Outputs are about the same in the debug mode, with just some information about the threads. No errors. |
Hi, I guess this is forgotten after the new year 😆 |
Hi there,
I accidentally realized when I access the element of tensor, and when I ask the index that is supposed to be out-of-range,
elt()
can still return a value, rather then just throwing an error. Though it appears like it always returns zero.Personally I think it will be better to just throw an error, so even users are doing something wrongly, at least they got a notice?
best,
taolin
The text was updated successfully, but these errors were encountered: