0
我有一個我想在GPU上執行的ptx代碼。我使用下面的代碼是:cudaModuleLoadData失敗,錯誤代碼爲201
CUmodule cudaModule;
//the variable that stores the error associated with cuda API calls.
CUresult cudaErrorVariable;
//variable representing any cuda kernel function.
CUfunction CUDAPipelineKernel;
//initializing cuda driver
cudaErrorVariable = cuInit(0);
//checking for error while loading ptx code in CUmodule.
if(cudaErrorVariable != CUDA_SUCCESS){
myLogger->error("Unable to initialize CUDA driver");
return 1;
}
//loading the ptx code into the module.
cudaErrorVariable = cuModuleLoadData(&cudaModule, PTXCode);
//checking for error while loading ptx code in CUmodule.
if(cudaErrorVariable != CUDA_SUCCESS){
cuGetErrorString(cudaErrorVariable, (const char **)&errorString);
myLogger->error("Unable load ptx file into the module : CUDA Error {}", cudaErrorVariable);
return 1;
}
的cuModuleLoadData函數返回一個錯誤代碼201。我不知道這是什麼錯誤代碼的含義。有人能幫我找出錯誤嗎?