From e040bcb69a3dbcbc50cb747da845e281467075a4 Mon Sep 17 00:00:00 2001 From: Ahmed El-Shafiey Date: Sun, 14 Apr 2013 20:14:54 -0800 Subject: - Adding support for cudaFuncSetCacheConfig API, that allows changing the L1 Cache and Shared Memory configurations across kernels. The support enable the user to specify two more configurations (Preferred L1) or (Preferred Shared Memory) besides the default config. If the cudaFuncSetCacheConfig API is used to set the cache configuration of a specific kernel to either of these configuration (cudaFuncCachePreferShared, cudaFuncCachePreferL1), the simulator will change the cache configuration at kernel launch accordingly, if there is no alternative configurations provided to the simulator it will use the default configurations with a warning message display [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15816] --- src/stream_manager.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/stream_manager.cc') diff --git a/src/stream_manager.cc b/src/stream_manager.cc index 6d5737f..3b8f57f 100644 --- a/src/stream_manager.cc +++ b/src/stream_manager.cc @@ -152,7 +152,8 @@ void stream_operation::do_operation( gpgpu_sim *gpu ) break; case stream_kernel_launch: if( gpu->can_start_kernel() ) { - printf("kernel \'%s\' transfer to GPU hardware scheduler\n", m_kernel->name().c_str() ); + gpu->set_cache_config(m_kernel->name()); + printf("kernel \'%s\' transfer to GPU hardware scheduler\n", m_kernel->name().c_str() ); if( m_sim_mode ) gpgpu_cuda_ptx_sim_main_func( *m_kernel ); else -- cgit v1.3