Allocated memory information

Is there som easy way to check how much memory I have allocated on the graphics card?

Like cudaGetGraphicsCardMemoryInfo()

“You have allocated 342 MB out of 512 MB”

Take a look at cuMemGetInfo. The method returns the total memory and the free memory of the card.

total memory - free memory = used memory