From 1f25b1cc7a71898eda0216ec0a74cb55266cd4f0 Mon Sep 17 00:00:00 2001 From: Ahmed ElTantawy Date: Fri, 13 May 2016 09:47:22 -0700 Subject: remove the hackish comment and assign a default identifier for CUDA>=7.5 --- libcuda/cuda_runtime_api.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libcuda') diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index f2e3359..fc6ca03 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -1533,7 +1533,7 @@ cuobjdumpPTXSection* findPTXSectionInList(std::list sectionli ){ cuobjdumpPTXSection* ptxsection; if((ptxsection=dynamic_cast(*iter)) != NULL){ - //if(ptxsection->getIdentifier() == identifier) + if(ptxsection->getIdentifier() == identifier) return ptxsection; } } @@ -1632,10 +1632,13 @@ void** CUDARTAPI __cudaRegisterFatBinary( void *fatCubin ) // - Obtains the pointer to the actual fatbin structure from the FatBin handle (fatCubin). // - An integer inside the fatbin structure contains the relative offset to the source code file name. // - This offset differs among different CUDA and GCC versions. + #if (CUDART_VERSION <= 6000) char * pfatbin = (char*) fatDeviceText->d; int offset = *((int*)(pfatbin+48)); char * filename = (pfatbin+16+offset); - + #else + char * filename = "default"; + #endif // The extracted file name is associated with a fat_cubin_handle passed // into cudaLaunch(). Inside cudaLaunch(), the associated file name is // used to find the PTX/SASS section from cuobjdump, which contains the -- cgit v1.3