Xsyevd eigenvalue solver limits the matrix size

I am looking for eigenvalue decomposition of large matrices. As i understand, the old interface, syevd, had limited matrix size because it used 32-bit integers for the work size and so has been limited by ~2 G doubles. The new interface, Xsyevd, uses int64_t integers and is supposed not have that limitation. However, it cannot go beyond ~25000 matrix size and the subroutine, which is supposed to provide the buffer size on the device, fails even so the device memory maximum is not reached.