From 0cb76063ce079a0606598e145da351f134235ab5 Mon Sep 17 00:00:00 2001 From: "Andrew M. B. Boktor" Date: Wed, 18 Apr 2012 16:33:33 -0800 Subject: This changelist implements the following: 1. Adds support for using cuobjdump for both ptx and ptxplus execution. This has been tested with CUDA 4.0 . Ptxplus is no longer supported through decuda/decuda_to_ptxplus 2. Adds support for converting the SASS output by cuobjdump to ptxplus. This has been tested with CUDA 4.0 . The old path that extracts ptx from cubin files is still preserved 3. Adds a bank group model. (WARNING: memory config has changed, please adapt yours). To disable the bank groups model, set nbkgrp to 1 and tCCDL and tRTPL to 0 Diff the configuration files to learn about how to use those new options. Merging //depot/gpgpu_sim_research/fermi-test/distribution/... to //depot/gpgpu_sim_research/fermi/distribution/... [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 12023] --- src/cuda-sim/ptx_parser.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/cuda-sim/ptx_parser.cc') diff --git a/src/cuda-sim/ptx_parser.cc b/src/cuda-sim/ptx_parser.cc index 3db984d..308405a 100644 --- a/src/cuda-sim/ptx_parser.cc +++ b/src/cuda-sim/ptx_parser.cc @@ -43,6 +43,7 @@ const char *g_filename; unsigned g_max_regs_per_thread = 0; // the program intermediate representation... +static symbol_table *g_global_allfiles_symbol_table = NULL; static symbol_table *g_global_symbol_table = NULL; std::map g_sym_name_to_symbol_table; static symbol_table *g_current_symbol_table = NULL; @@ -105,7 +106,13 @@ void read_parser_environment_variables() symbol_table *init_parser( const char *ptx_filename ) { g_filename = strdup(ptx_filename); - g_global_symbol_table = g_current_symbol_table = new symbol_table("global",0,NULL); + if (g_global_allfiles_symbol_table == NULL) { + g_global_allfiles_symbol_table = new symbol_table("global_allfiles", 0, NULL); + g_global_symbol_table = g_current_symbol_table = g_global_allfiles_symbol_table; + } + else { + g_global_symbol_table = g_current_symbol_table = new symbol_table("global",0,g_global_allfiles_symbol_table); + } ptx_lineno = 1; #define DEF(X,Y) g_ptx_token_decode[X] = Y; @@ -767,7 +774,7 @@ void add_scalar_operand( const char *identifier ) DPRINTF("add_scalar_operand"); const symbol *s = g_current_symbol_table->lookup(identifier); if ( s == NULL ) { - if ( g_opcode == BRA_OP || g_opcode == CALLP_OP || g_opcode == BREAKADDR_OP) { + if ( g_opcode == BRA_OP || g_opcode == CALLP_OP) { // forward branch target... s = g_current_symbol_table->add_variable(identifier,NULL,0,g_filename,ptx_lineno); } else { -- cgit v1.3