Question

I've been using CUDA 4.0 for sometime now. I've recently downloaded and copied CUDA 4.1 new API (I need Thrust's lambda expressions support) but my solution's properties are still linked to the old 4.0 API. How do I change it dynamically? My guess is that I need to change the $(CudaToolkitLibDir) variable, but how exactly?

edit : i'm asking this because i'm trying to use thrust::placeholders

Was it helpful?

Solution

To answer the specific question:

  • For VS2005 or VS2008, you need to change the Custom Build Rules to pick up the CUDA 4.1 rule instead of 4.0. See this post for more information.
  • For VS2010, you need to change the Build Customization to pick up CUDA 4.1 instead. See this post for more information.

Looking at the comments, it's also clear you will need to install a CUDA 4.1 driver which you can download from the NVIDIA website. You said your program crashed on the first cudaMalloc() when you updated to 4.1, you should check the error message (in general you should check all API calls for errors). The first CUDA API call will return an "Insufficient Driver Version" message if your driver is not up-to-date.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top