Cannot use GPU cloth

Hi,there. I use the following statement to enable GPU acceleration as the API DOC says:
PxCloth::setClothFlag(PxClothFlag::eGPU, true);
But it doesn’t work, program alway prompt message"warning : GPU cloth creation failed. Falling back to CPU implementation"
What does this mean? Should I do some extra work to set up CUDA environment? btw,my video card is nvidia quadro k600.
Thanks in advance.

Did you create and setup a CudaContextManager ? It is not as simple as just enabling a flags as you will see if you examine the samples.

Thanks a lot @busta78, you are right! Here is my code to setup CudaContexManager in PhysX initialization:

PxProfileZoneManager* profileZoneManager = &PxProfileZoneManager::createProfileZoneManager(m_foundation);
PxCudaContextManagerDesc cudaContextManagerDesc;
PxCudaContextManager* mCudaContextManager = PxCreateCudaContextManager(*m_foundation, cudaContextManagerDesc, profileZoneManager);
if(mCudaContextManager)
{
if(!mCudaContextManager->contextIsValid())
{
mCudaContextManager->release();
mCudaContextManager = NULL;
}
}
sceneDesc.gpuDispatcher = mCudaContextManager->getGpuDispatcher();

These codes should place before PxScene created, and after PxFoundation created.

BTW, you should put PhysX3GpuDEBUG.dll or PhysX3GpuCHECKED.dll or… into the same folder of your executable program, otherwise this statement will return NULL:PxCudaContextManager* mCudaContextManager = PxCreateCudaContextManager(*m_foundation, cudaContextManagerDesc, profileZoneManager);

…Good to know that you solved the issue.
As for the binaries, I would recommend placing them in executable directory for deployment, but for development it would be more flexible to just add the binary location to your path environmental variable, this way you can switch binaries ( with minimal rebuild of course ), without having to be constantly renaming/deleting them.

Good idea! Again, thank you very much!

Hi, @busta78. I don’t know if you can see this, but I need your help again. Since there is no warning message prompt after I add the codes before mentioned, so I think I have open GPU cloth successfully. However, I haven’t see any speed up yet. Could you tell me why? Thank you very much. BTW, I post another question about GPU cloth just now.