summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmed ElTantawy <[email protected]>2016-05-13 09:47:22 -0700
committerAhmed ElTantawy <[email protected]>2016-05-13 09:47:22 -0700
commit1f25b1cc7a71898eda0216ec0a74cb55266cd4f0 (patch)
tree8ffa59b78d4b0cafc8afdf228ac29aaa1ad74b0e
parent7ac360c0a2defc5612fec6a106c703145e642aaa (diff)
remove the hackish comment and assign a default identifier for CUDA>=7.5
-rw-r--r--libcuda/cuda_runtime_api.cc7
1 files changed, 5 insertions, 2 deletions
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<cuobjdumpSection*> sectionli
){
cuobjdumpPTXSection* ptxsection;
if((ptxsection=dynamic_cast<cuobjdumpPTXSection*>(*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