card memory used like RAM?

Hi, I have a question about the card memory. Imagine I have a card with 512 MB memory.
-Does this mean I can copy up to 512 MB from host to device?
Is this a theoretical value? What if there’s already stuff by Windows, eventual games etc. in the card memory?
-What happens if I try to copy more than 512 MB to the device?
-Can I leave my data within the card memory?
I want to do a similar string search. Once I saved the n-grams they could stay within the card memory and
I only copy them back to the host when I want to save the data to the hard disk. Is this possible?

Thanks!!!

  1. This is a theoretical value, meaning some of it goes to the framebuffer and such. I’m not sure how much you can really allocate, I presume somewhere around 450MB?
  2. You get runtime errors I believe
  3. Yes, the data you put there stays there. You can (and should) do as you plan - keep the copying to/from host to the minimum.

Aha, thanks for the reply!

But what if I filled up the 450 MB or so with my 3-grams (similar string search) and then
launch my ‘Fall Out 3’ or ‘Counter Strike’?
What happens to my data in the card memory? What happens to the game?

Good question.

During a mode switch (ie, you change the resolution and your screen goes black), CUDA kills itself.

It’s all extremely elegant. (I think it works this way even on Vista, which fundamentally has a virtualized memory subsystem that can swap out memory from the card to play a game and then swap it back in.)