summaryrefslogtreecommitdiff
path: root/libcuda/cuda_runtime_api.cc
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-10-03 15:16:46 -0800
committerTor Aamodt <[email protected]>2010-10-03 15:16:46 -0800
commitf97c52bbaed425f5ada9758c248c9a2c2b9853dd (patch)
tree99879a71c34f52a9a6038e85a947b3ffa4bc62c2 /libcuda/cuda_runtime_api.cc
parent5c220c406491b72054a00d1dceab222ab796f06a (diff)
1. enable L2 cache as a texture cache (also some bug fixes for L2 as regular cache)
2. update gpgpusim.config for Quadro to use L1 cache geometry from Henry's ISPASS paper 3. minor edit to CUDA api : add notion of fat_cubin_handle (currently not used for anything) 4. minor edits to deadlock detection message (more accurate reporting of source of deadlock) 5. other minor edits [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7809]
Diffstat (limited to 'libcuda/cuda_runtime_api.cc')
-rw-r--r--libcuda/cuda_runtime_api.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index adfcb16..c7d19e0 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -1036,6 +1036,8 @@ int CUDARTAPI __cudaSynchronizeThreads(void**, void*)
void** CUDARTAPI __cudaRegisterFatBinary( void *fatCubin )
{
+ static unsigned next_fat_bin_handle = 1;
+ unsigned fat_cubin_handle = next_fat_bin_handle++;
#if (CUDART_VERSION >= 2010)
__cudaFatCudaBinary *info = (__cudaFatCudaBinary *)fatCubin;
assert( info->version >= 3 );
@@ -1054,10 +1056,10 @@ void** CUDARTAPI __cudaRegisterFatBinary( void *fatCubin )
if ( selected_capability_offset != (unsigned)-1 ) {
printf("GPGPU-Sim PTX: __cudaRegisterFatBinary found %u PTX versions for '%s', ", num_ptx_versions, info->ident);
printf("selected = %s\n", info->ptx[selected_capability_offset].gpuProfileName );
- gpgpu_ptx_sim_add_ptxstring( info->ptx[selected_capability_offset].ptx, info->cubin[selected_capability_offset].cubin, info->ident );
+ gpgpu_ptx_sim_add_ptxstring( fat_cubin_handle, info->ptx[selected_capability_offset].ptx, info->cubin[selected_capability_offset].cubin, info->ident );
}
#endif
- return 0;
+ return (void**)fat_cubin_handle;
}
void __cudaUnregisterFatBinary(void **fatCubinHandle)
{
@@ -1077,7 +1079,7 @@ void CUDARTAPI __cudaRegisterFunction(
dim3 *gDim
)
{
- gpgpu_ptx_sim_register_kernel(hostFun,deviceFun);
+ gpgpu_ptx_sim_register_kernel(fatCubinHandle,hostFun,deviceFun);
return;
}