summaryrefslogtreecommitdiff
path: root/libcuda
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-10-24 00:36:19 -0800
committerTor Aamodt <[email protected]>2010-10-24 00:36:19 -0800
commit6eee7514ea8b72fbecd761c50ccfd3394edf2307 (patch)
tree1260a88984124f960251dba47142e950f4367be2 /libcuda
parent4da926e61569a069bac229e8ba649e600fc78a04 (diff)
1. adding top level configuration class and making shader and memory configuration
components of this class. 2. clock memory pipeline no. subwarp times for each shader clock and increase rob-size for texture cache (trying to improve correlation, currently at 0.9218) 3. start to modify shader stats to add back features for visualizer (warp divergence distribution kind of working again) passing cuda 3.1 regression and ptxplus correlation tests [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7909]
Diffstat (limited to 'libcuda')
-rw-r--r--libcuda/cuda_runtime_api.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index 93f7512..1990076 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -183,7 +183,7 @@ void register_ptx_function( const char *name, function_info *impl )
struct _cuda_device_id {
_cuda_device_id(gpgpu_sim* gpu) {m_id = 0; m_next = NULL; m_gpgpu=gpu;}
struct _cuda_device_id *next() { return m_next; }
- unsigned num_shader() const { return m_gpgpu->num_shader(); }
+ unsigned num_shader() const { return m_gpgpu->get_config().num_shader(); }
int num_devices() const {
if( m_next == NULL ) return 1;
else return 1 + m_next->num_devices();
@@ -282,7 +282,7 @@ class _cuda_device_id *GPGPUSim_Init()
prop->warpSize = the_gpu->wrp_size();
prop->clockRate = the_gpu->shader_clock();
#if (CUDART_VERSION >= 2010)
- prop->multiProcessorCount = the_gpu->num_shader();
+ prop->multiProcessorCount = the_gpu->get_config().num_shader();
#endif
the_gpu->set_prop(prop);
the_device = new _cuda_device_id(the_gpu);
@@ -1103,7 +1103,7 @@ void** CUDARTAPI __cudaRegisterFatBinary( void *fatCubin )
unsigned max_capability=0;
unsigned selected_capability=0;
bool found=false;
- unsigned forced_max_capability = context->get_device()->get_gpgpu()->get_forced_max_capability();
+ unsigned forced_max_capability = context->get_device()->get_gpgpu()->get_config().get_forced_max_capability();
while( info->ptx[num_ptx_versions].gpuProfileName != NULL ) {
unsigned capability=0;
sscanf(info->ptx[num_ptx_versions].gpuProfileName,"compute_%u",&capability);
@@ -1129,9 +1129,9 @@ void** CUDARTAPI __cudaRegisterFatBinary( void *fatCubin )
info->ident, info->ptx[selected_capability].gpuProfileName );
symbol_table *symtab;
const char *ptx = info->ptx[selected_capability].ptx;
- if(context->get_device()->get_gpgpu()->convert_to_ptxplus() ) {
+ if(context->get_device()->get_gpgpu()->get_config().convert_to_ptxplus() ) {
char *ptxplus_str = gpgpu_ptx_sim_convert_ptx_to_ptxplus(ptx, info->cubin[selected_capability].cubin, source_num++,
- context->get_device()->get_gpgpu()->saved_converted_ptxplus());
+ context->get_device()->get_gpgpu()->get_config().saved_converted_ptxplus());
symtab=gpgpu_ptx_sim_load_ptx_from_string(ptxplus_str,source_num);
context->add_binary(symtab,fat_cubin_handle);
gpgpu_ptxinfo_load_from_string(ptx,source_num);