diff options
| author | Andrew M. B. Boktor <[email protected]> | 2012-05-17 21:34:59 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:47:31 -0700 |
| commit | 4ef56f6e1f21ea77a1747fac9e13948ad448269f (patch) | |
| tree | 403ae36411e8c82a26201df38371dbe508d9febe /libcuda | |
| parent | 6e281393ada26a1a89dc564a3058b606bf68262b (diff) | |
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]
Diffstat (limited to 'libcuda')
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 5 |
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); |
