From bc96229ad220fbb0bda1354a699efc41783f4f27 Mon Sep 17 00:00:00 2001 From: "Andrew M. B. Boktor" Date: Fri, 17 Aug 2012 15:39:05 -0800 Subject: Fixing the case where cuobjdump is not used for on demand loading of binaries [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 13795] --- libcuda/cuda_runtime_api.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libcuda') diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 9eee56a..011fef3 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -1638,7 +1638,8 @@ void CUDARTAPI __cudaRegisterFunction( unsigned fat_cubin_handle = (unsigned)(unsigned long long)fatCubinHandle; printf("GPGPU-Sim PTX: __cudaRegisterFunction %s : hostFun 0x%p, fat_cubin_handle = %u\n", deviceFun, hostFun, fat_cubin_handle); - cuobjdumpParseBinary(fat_cubin_handle); + if(context->get_device()->get_gpgpu()->get_config().use_cuobjdump()) + cuobjdumpParseBinary(fat_cubin_handle); context->register_function( fat_cubin_handle, hostFun, deviceFun ); } @@ -1654,7 +1655,8 @@ extern void __cudaRegisterVar( { printf("GPGPU-Sim PTX: __cudaRegisterVar: hostVar = %p; deviceAddress = %s; deviceName = %s\n", hostVar, deviceAddress, deviceName); printf("GPGPU-Sim PTX: __cudaRegisterVar: Registering const memory space of %d bytes\n", size); - cuobjdumpParseBinary((unsigned)(unsigned long long)fatCubinHandle); + if(GPGPUSim_Context()->get_device()->get_gpgpu()->get_config().use_cuobjdump()) + cuobjdumpParseBinary((unsigned)(unsigned long long)fatCubinHandle); fflush(stdout); if ( constant && !global && !ext ) { gpgpu_ptx_sim_register_const_variable(hostVar,deviceName,size); -- cgit v1.3