I’m running a C program where I call twice a cuda host function. I want to clean up the device memory between these 2 calls. Is there a way I can flush GPU device memory?? I’m on a Tesla M2050 with computing capability of 2.0
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you only want to zero the memory, then
cudaMemsetis probably the simplest way to do this. For example:Note that the value
cudaMemsettakes is a byte value, and all bytes in the specified range are set to that value, just like the standard Cmemset. If you have a specific word value, then you will need to write your own memset kernel to assign the values.