From 4ef56f6e1f21ea77a1747fac9e13948ad448269f Mon Sep 17 00:00:00 2001 From: "Andrew M. B. Boktor" Date: Thu, 17 May 2012 21:34:59 -0800 Subject: Catching the problem where the embedded ptx cannot be found because the benchmark is compiled with CUDA4 and cuobjdump is not enabled [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 12653] --- libcuda/cuda_runtime_api.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libcuda/cuda_runtime_api.cc') 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); -- cgit v1.3