summaryrefslogtreecommitdiff
path: root/libcuda
diff options
context:
space:
mode:
Diffstat (limited to 'libcuda')
-rw-r--r--libcuda/cuda_runtime_api.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index c952ee5..c64aa14 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -1431,6 +1431,11 @@ void** CUDARTAPI __cudaRegisterFatBinary( void *fatCubin )
unsigned selected_capability=0;
bool found=false;
unsigned forced_max_capability = context->get_device()->get_gpgpu()->get_config().get_forced_max_capability();
+ if (!info->ptx){
+ printf("ERROR: Cannot find ptx code in cubin file\n"
+ "\tIf you are using CUDA 4.0 or higher, please enable cuobjdump or downgrade to CUDA 3.1\n");
+ exit(1);
+ }
while( info->ptx[num_ptx_versions].gpuProfileName != NULL ) {
unsigned capability=0;
sscanf(info->ptx[num_ptx_versions].gpuProfileName,"compute_%u",&capability);