In poker? Yes it is.
Casino game? Stupidity at its peak.
This makes sense.
I typically all in in poker when I think that I'm winning with the cards in my hands. But if I know that it won't make sense and have upperhand, I'll fold.
But in casino games, I don't think it's stupidity when someone does that. All-in doesn't mean that you should only do it with huge amounts but, if we have a remaining small amount of bucks, we could all in with that as well.