Never. I'm too stubborn. I might stop for a bit out of sheer irritation but I'll always come back after a little while and keep at it.

The last time this happened was against Sazh's Eidolon in XIII. I lost dozens of times until eventually i stopped and then came back later that night to beat it.