From f97c52bbaed425f5ada9758c248c9a2c2b9853dd Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Sun, 3 Oct 2010 15:16:46 -0800 Subject: 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] --- libcuda/cuda_runtime_api.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libcuda/cuda_runtime_api.cc') 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; } -- cgit v1.3