diff options
| author | Ahmed ElTantawy <[email protected]> | 2015-03-04 12:02:52 -0800 |
|---|---|---|
| committer | Ahmed ElTantawy <[email protected]> | 2015-03-04 12:02:52 -0800 |
| commit | 18e0b0614611edcb19ee0a3b315c7b45e50b5595 (patch) | |
| tree | 0afded3735b698e71fe37f39a43dc750083d32bc | |
| parent | 7cd0edfe0cb654280c30afef89a563867d9e67ed (diff) | |
initial support for CUDA 5.0, 5.5, 6.0 to get template from SDK running
| -rw-r--r-- | CHANGES | 3 | ||||
| -rw-r--r-- | Makefile | 3 | ||||
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 31 | ||||
| -rw-r--r-- | libcuda/cuobjdump.l | 1 | ||||
| -rw-r--r-- | setup_environment | 3 | ||||
| -rw-r--r-- | src/abstract_hardware_model.h | 7 | ||||
| -rw-r--r-- | src/cuda-sim/cuda-sim.cc | 72 | ||||
| -rw-r--r-- | src/cuda-sim/cuda-sim.h | 4 | ||||
| -rw-r--r-- | src/cuda-sim/ptx.y | 2 | ||||
| -rw-r--r-- | src/cuda-sim/ptx_ir.cc | 4 | ||||
| -rw-r--r-- | src/cuda-sim/ptx_ir.h | 6 | ||||
| -rw-r--r-- | src/cuda-sim/ptx_loader.cc | 14 | ||||
| -rw-r--r-- | src/cuda-sim/ptxinfo.l | 1 | ||||
| -rw-r--r-- | src/cuda-sim/ptxinfo.y | 10 | ||||
| -rw-r--r-- | src/gpgpu-sim/shader.cc | 4 |
15 files changed, 111 insertions, 54 deletions
@@ -5,7 +5,8 @@ Version 3.2.3+edits (development branch) versus 3.2.3 the two default cache sizes, 16KB/48KB with 32/64 sets. - Added support for named barriers. - Added support for bar.arrive and bar.red instructions. - +- Initial support for CUDA 5.0,5.5 and 6.0 to get template running. + - Bug fixes: - Fixed bug #81, fix ordering of pushing branch entries to the stack @@ -152,6 +152,9 @@ $(SIM_LIB_DIR)/libcudart.so: makedirs $(LIBS) cudalib if [ ! -f $(SIM_LIB_DIR)/libcudart.so.2 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.2; fi if [ ! -f $(SIM_LIB_DIR)/libcudart.so.3 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.3; fi if [ ! -f $(SIM_LIB_DIR)/libcudart.so.4 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.4; fi + if [ ! -f $(SIM_LIB_DIR)/libcudart.so.5.0 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.5.0; fi + if [ ! -f $(SIM_LIB_DIR)/libcudart.so.5.5 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.5.5; fi + if [ ! -f $(SIM_LIB_DIR)/libcudart.so.6.0 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.6.0; fi $(SIM_LIB_DIR)/libcudart.dylib: makedirs $(LIBS) cudalib g++ -dynamiclib -Wl,-headerpad_max_install_names,-undefined,dynamic_lookup,-compatibility_version,1.1,-current_version,1.1\ diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 72ade49..eed4017 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -227,7 +227,12 @@ private: }; struct CUctx_st { - CUctx_st( _cuda_device_id *gpu ) { m_gpu = gpu; } + CUctx_st( _cuda_device_id *gpu ) + { + m_gpu = gpu; + m_binary_info.cmem = 0; + m_binary_info.gmem = 0; + } _cuda_device_id *get_device() { return m_gpu; } @@ -237,7 +242,7 @@ struct CUctx_st { m_last_fat_cubin_handle = fat_cubin_handle; } - void add_ptxinfo( const char *deviceFun, const struct gpgpu_ptx_sim_kernel_info &info ) + void add_ptxinfo( const char *deviceFun, const struct gpgpu_ptx_sim_info &info ) { symbol *s = m_code[m_last_fat_cubin_handle]->lookup(deviceFun); assert( s != NULL ); @@ -246,6 +251,11 @@ struct CUctx_st { f->set_kernel_info(info); } + void add_ptxinfo( const struct gpgpu_ptx_sim_info &info ) + { + m_binary_info = info; + } + void register_function( unsigned fat_cubin_handle, const char *hostFun, const char *deviceFun ) { if( m_code.find(fat_cubin_handle) != m_code.end() ) { @@ -271,6 +281,8 @@ private: std::map<unsigned,symbol_table*> m_code; // fat binary handle => global symbol table unsigned m_last_fat_cubin_handle; std::map<const void*,function_info*> m_kernel_lookup; // unique id (CUDA app function address) => kernel entry point + struct gpgpu_ptx_sim_info m_binary_info; + }; class kernel_config { @@ -346,14 +358,22 @@ static CUctx_st* GPGPUSim_Context() void ptxinfo_addinfo() { - if( !strcmp("__cuda_dummy_entry__",get_ptxinfo_kname()) ) { + if(!get_ptxinfo_kname()){ + /* This info is not per kernel (since CUDA 5.0 some info (e.g. gmem, and cmem) is added at the beginning for the whole binary ) */ + CUctx_st *context = GPGPUSim_Context(); + print_ptxinfo(); + context->add_ptxinfo(get_ptxinfo()); + clear_ptxinfo(); + return; + } + if( !strcmp("__cuda_dummy_entry__",get_ptxinfo_kname()) ) { // this string produced by ptxas for empty ptx files (e.g., bandwidth test) clear_ptxinfo(); return; } CUctx_st *context = GPGPUSim_Context(); print_ptxinfo(); - context->add_ptxinfo( get_ptxinfo_kname(), get_ptxinfo_kinfo() ); + context->add_ptxinfo( get_ptxinfo_kname(), get_ptxinfo() ); clear_ptxinfo(); } @@ -1307,7 +1327,6 @@ void extract_code_using_cuobjdump(){ system(command); // Running cuobjdump using dynamic link to current process snprintf(command,1000,"$CUDA_INSTALL_PATH/bin/cuobjdump -ptx -elf -sass %s > %s", app_binary.c_str(), fname); - printf("Running cuobjdump using \"%s\"\n", command); bool parse_output = true; int result = system(command); if(result) { @@ -1923,7 +1942,7 @@ cudaError_t CUDARTAPI cudaFuncGetAttributes(struct cudaFuncAttributes *attr, con CUctx_st *context = GPGPUSim_Context(); function_info *entry = context->get_kernel(hostFun); if( entry ) { - const struct gpgpu_ptx_sim_kernel_info *kinfo = entry->get_kernel_info(); + const struct gpgpu_ptx_sim_info *kinfo = entry->get_kernel_info(); attr->sharedSizeBytes = kinfo->smem; attr->constSizeBytes = kinfo->cmem; attr->localSizeBytes = kinfo->lmem; diff --git a/libcuda/cuobjdump.l b/libcuda/cuobjdump.l index d264338..d7086ad 100644 --- a/libcuda/cuobjdump.l +++ b/libcuda/cuobjdump.l @@ -103,6 +103,7 @@ newlines {newline}+ <header>"producer = " return H_PRODUCER; <header>"host = " return H_HOST; <header>"compile_size = " return H_COMPILESIZE; +<header>"compressed"{newline} <header>"identifier = " BEGIN(endheader); return H_IDENTIFIER; <header>"has debug info"{newline} diff --git a/setup_environment b/setup_environment index f1a63f2..839da60 100644 --- a/setup_environment +++ b/setup_environment @@ -44,8 +44,7 @@ CC_VERSION=`gcc --version | head -1 | awk '{for(i=1;i<=NF;i++){ if(match($i,/^[0 CUDA_VERSION_STRING=`$CUDA_INSTALL_PATH/bin/nvcc --version | awk '/release/ {print $5;}' | sed 's/,//'`; CUDA_VERSION_NUMBER=`echo $CUDA_VERSION_STRING | sed 's/\./ /' | awk '{printf("%02u%02u", 10*int($1), 10*$2);}'` if [ $CUDA_VERSION_NUMBER -gt 4020 -o $CUDA_VERSION_NUMBER -lt 2030 ]; then - echo "ERROR ** GPGPU-Sim version $GPGPUSIM_VERSION_STRING not tested with CUDA version $CUDA_VERSION_STRING (please see README)"; - return; + echo "WARNING ** GPGPU-Sim version $GPGPUSIM_VERSION_STRING not tested with CUDA version $CUDA_VERSION_STRING (please see README)"; fi if [ $# = '1' ] ; diff --git a/src/abstract_hardware_model.h b/src/abstract_hardware_model.h index 936d208..ba4ea29 100644 --- a/src/abstract_hardware_model.h +++ b/src/abstract_hardware_model.h @@ -443,6 +443,7 @@ private: unsigned m_texcache_linesize; }; + class gpgpu_t { public: gpgpu_t( const gpgpu_functional_sim_config &config ); @@ -497,7 +498,7 @@ protected: class memory_space *m_global_mem; class memory_space *m_tex_mem; class memory_space *m_surf_mem; - + unsigned long long m_dev_malloc; std::map<std::string, const struct textureReference*> m_NameToTextureRef; @@ -506,18 +507,20 @@ protected: std::map<const struct textureReference*, const struct textureReferenceAttr*> m_TextureRefToAttribute; }; -struct gpgpu_ptx_sim_kernel_info +struct gpgpu_ptx_sim_info { // Holds properties of the kernel (Kernel's resource use). // These will be set to zero if a ptxinfo file is not present. int lmem; int smem; int cmem; + int gmem; int regs; unsigned ptx_version; unsigned sm_target; }; + struct gpgpu_ptx_sim_arg { gpgpu_ptx_sim_arg() { m_start=NULL; } gpgpu_ptx_sim_arg(const void *arg, size_t size, size_t offset) diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc index ab54121..715be98 100644 --- a/src/cuda-sim/cuda-sim.cc +++ b/src/cuda-sim/cuda-sim.cc @@ -1382,7 +1382,7 @@ void set_param_gpgpu_num_shaders(int num_shaders) gpgpu_param_num_shaders = num_shaders; } -const struct gpgpu_ptx_sim_kernel_info* ptx_sim_kernel_info(const function_info *kernel) +const struct gpgpu_ptx_sim_info* ptx_sim_kernel_info(const function_info *kernel) { return kernel->get_kernel_info(); } @@ -1867,7 +1867,7 @@ unsigned translate_pc_to_ptxlineno(unsigned pc) int g_ptxinfo_error_detected; static char *g_ptxinfo_kname = NULL; -static struct gpgpu_ptx_sim_kernel_info g_ptxinfo_kinfo; +static struct gpgpu_ptx_sim_info g_ptxinfo; const char *get_ptxinfo_kname() { @@ -1876,18 +1876,25 @@ const char *get_ptxinfo_kname() void print_ptxinfo() { - printf ("GPGPU-Sim PTX: Kernel \'%s\' : regs=%u, lmem=%u, smem=%u, cmem=%u\n", - get_ptxinfo_kname(), - g_ptxinfo_kinfo.regs, - g_ptxinfo_kinfo.lmem, - g_ptxinfo_kinfo.smem, - g_ptxinfo_kinfo.cmem ); + if(! get_ptxinfo_kname()){ + printf ("GPGPU-Sim PTX: Binary info : gmem=%u, cmem=%u\n", + g_ptxinfo.gmem, + g_ptxinfo.cmem); + } + if(get_ptxinfo_kname()){ + printf ("GPGPU-Sim PTX: Kernel \'%s\' : regs=%u, lmem=%u, smem=%u, cmem=%u\n", + get_ptxinfo_kname(), + g_ptxinfo.regs, + g_ptxinfo.lmem, + g_ptxinfo.smem, + g_ptxinfo.cmem ); + } } -struct gpgpu_ptx_sim_kernel_info get_ptxinfo_kinfo() +struct gpgpu_ptx_sim_info get_ptxinfo() { - return g_ptxinfo_kinfo; + return g_ptxinfo; } void ptxinfo_function(const char *fname ) @@ -1898,39 +1905,54 @@ void ptxinfo_function(const char *fname ) void ptxinfo_regs( unsigned nregs ) { - g_ptxinfo_kinfo.regs=nregs; + g_ptxinfo.regs=nregs; } void ptxinfo_lmem( unsigned declared, unsigned system ) { - g_ptxinfo_kinfo.lmem=declared+system; + g_ptxinfo.lmem=declared+system; +} + +void ptxinfo_gmem( unsigned declared, unsigned system ) +{ + g_ptxinfo.gmem=declared+system; } void ptxinfo_smem( unsigned declared, unsigned system ) { - g_ptxinfo_kinfo.smem=declared+system; + g_ptxinfo.smem=declared+system; } void ptxinfo_cmem( unsigned nbytes, unsigned bank ) { - g_ptxinfo_kinfo.cmem+=nbytes; + g_ptxinfo.cmem+=nbytes; } void clear_ptxinfo() { free(g_ptxinfo_kname); g_ptxinfo_kname=NULL; - g_ptxinfo_kinfo.regs=0; - g_ptxinfo_kinfo.lmem=0; - g_ptxinfo_kinfo.smem=0; - g_ptxinfo_kinfo.cmem=0; - g_ptxinfo_kinfo.ptx_version=0; - g_ptxinfo_kinfo.sm_target=0; + g_ptxinfo.regs=0; + g_ptxinfo.lmem=0; + g_ptxinfo.smem=0; + g_ptxinfo.cmem=0; + g_ptxinfo.gmem=0; + g_ptxinfo.ptx_version=0; + g_ptxinfo.sm_target=0; } void ptxinfo_opencl_addinfo( std::map<std::string,function_info*> &kernels ) { + + if(! g_ptxinfo_kname) { + printf ("GPGPU-Sim PTX: Binary info : gmem=%u, cmem=%u\n", + g_ptxinfo.gmem, + g_ptxinfo.cmem); + clear_ptxinfo(); + return; + } + if( !strcmp("__cuda_dummy_entry__",g_ptxinfo_kname) ) { // this string produced by ptxas for empty ptx files (e.g., bandwidth test) clear_ptxinfo(); @@ -1943,13 +1965,13 @@ void ptxinfo_opencl_addinfo( std::map<std::string,function_info*> &kernels ) } else { printf ("GPGPU-Sim PTX: Kernel \'%s\' : regs=%u, lmem=%u, smem=%u, cmem=%u\n", g_ptxinfo_kname, - g_ptxinfo_kinfo.regs, - g_ptxinfo_kinfo.lmem, - g_ptxinfo_kinfo.smem, - g_ptxinfo_kinfo.cmem ); + g_ptxinfo.regs, + g_ptxinfo.lmem, + g_ptxinfo.smem, + g_ptxinfo.cmem ); function_info *finfo = k->second; assert(finfo!=NULL); - finfo->set_kernel_info( g_ptxinfo_kinfo ); + finfo->set_kernel_info( g_ptxinfo ); } clear_ptxinfo(); } diff --git a/src/cuda-sim/cuda-sim.h b/src/cuda-sim/cuda-sim.h index 4c26350..958daba 100644 --- a/src/cuda-sim/cuda-sim.h +++ b/src/cuda-sim/cuda-sim.h @@ -73,7 +73,7 @@ unsigned ptx_sim_init_thread( kernel_info_t &kernel, gpgpu_t *gpu, bool functionalSimulationMode = false); const warp_inst_t *ptx_fetch_inst( address_type pc ); -const struct gpgpu_ptx_sim_kernel_info* ptx_sim_kernel_info(const class function_info *kernel); +const struct gpgpu_ptx_sim_info* ptx_sim_kernel_info(const class function_info *kernel); void ptx_print_insn( address_type pc, FILE *fp ); std::string ptx_get_insn_str( address_type pc ); void set_param_gpgpu_num_shaders(int num_shaders); @@ -129,6 +129,6 @@ address_type get_return_pc( void *thd ); const char *get_ptxinfo_kname(); void print_ptxinfo(); void clear_ptxinfo(); -struct gpgpu_ptx_sim_kernel_info get_ptxinfo_kinfo(); +struct gpgpu_ptx_sim_info get_ptxinfo(); #endif diff --git a/src/cuda-sim/ptx.y b/src/cuda-sim/ptx.y index 770ee1d..79faddf 100644 --- a/src/cuda-sim/ptx.y +++ b/src/cuda-sim/ptx.y @@ -239,6 +239,7 @@ function_ident_param: IDENTIFIER { add_function_name($1); } LEFT_PAREN {func_hea ; function_decl_header: ENTRY_DIRECTIVE { $$ = 1; g_func_decl=1; func_header(".entry"); } + | VISIBLE_DIRECTIVE ENTRY_DIRECTIVE { $$ = 1; g_func_decl=1; func_header(".entry"); } | FUNC_DIRECTIVE { $$ = 0; g_func_decl=1; func_header(".func"); } | VISIBLE_DIRECTIVE FUNC_DIRECTIVE { $$ = 0; g_func_decl=1; func_header(".func"); } | EXTERN_DIRECTIVE FUNC_DIRECTIVE { $$ = 2; g_func_decl=1; func_header(".func"); } @@ -279,6 +280,7 @@ directive_statement: variable_declaration SEMI_COLON | TARGET_DIRECTIVE IDENTIFIER COMMA IDENTIFIER COMMA IDENTIFIER { target_header3($2,$4,$6); } | TARGET_DIRECTIVE IDENTIFIER { target_header($2); } | FILE_DIRECTIVE INT_OPERAND STRING { add_file($2,$3); } + | FILE_DIRECTIVE INT_OPERAND STRING COMMA INT_OPERAND COMMA INT_OPERAND { add_file($2,$3); } | LOC_DIRECTIVE INT_OPERAND INT_OPERAND INT_OPERAND | PRAGMA_DIRECTIVE STRING SEMI_COLON { add_pragma($2); } | function_decl SEMI_COLON {/*Do nothing*/} diff --git a/src/cuda-sim/ptx_ir.cc b/src/cuda-sim/ptx_ir.cc index 490cb10..6943b48 100644 --- a/src/cuda-sim/ptx_ir.cc +++ b/src/cuda-sim/ptx_ir.cc @@ -843,14 +843,14 @@ void function_info::print_basic_block_dot() unsigned ptx_kernel_shmem_size( void *kernel_impl ) { function_info *f = (function_info*)kernel_impl; - const struct gpgpu_ptx_sim_kernel_info *kernel_info = f->get_kernel_info(); + const struct gpgpu_ptx_sim_info *kernel_info = f->get_kernel_info(); return kernel_info->smem; } unsigned ptx_kernel_nregs( void *kernel_impl ) { function_info *f = (function_info*)kernel_impl; - const struct gpgpu_ptx_sim_kernel_info *kernel_info = f->get_kernel_info(); + const struct gpgpu_ptx_sim_info *kernel_info = f->get_kernel_info(); return kernel_info->regs; } diff --git a/src/cuda-sim/ptx_ir.h b/src/cuda-sim/ptx_ir.h index b51406e..601a13d 100644 --- a/src/cuda-sim/ptx_ir.h +++ b/src/cuda-sim/ptx_ir.h @@ -1229,12 +1229,12 @@ public: void param_to_shared( memory_space *shared_mem, symbol_table *symtab ); void list_param( FILE *fout ) const; - const struct gpgpu_ptx_sim_kernel_info* get_kernel_info () const + const struct gpgpu_ptx_sim_info* get_kernel_info () const { return &m_kernel_info; } - const void set_kernel_info (const struct gpgpu_ptx_sim_kernel_info &info) { + const void set_kernel_info (const struct gpgpu_ptx_sim_info &info) { m_kernel_info = info; m_kernel_info.ptx_version = 10*get_ptx_version().ver(); m_kernel_info.sm_target = get_ptx_version().target(); @@ -1282,7 +1282,7 @@ private: unsigned num_reconvergence_pairs; //Registers/shmem/etc. used (from ptxas -v), loaded from ___.ptxinfo along with ___.ptx - struct gpgpu_ptx_sim_kernel_info m_kernel_info; + struct gpgpu_ptx_sim_info m_kernel_info; symbol_table *m_symtab; diff --git a/src/cuda-sim/ptx_loader.cc b/src/cuda-sim/ptx_loader.cc index 4ed57da..e293065 100644 --- a/src/cuda-sim/ptx_loader.cc +++ b/src/cuda-sim/ptx_loader.cc @@ -232,12 +232,14 @@ void gpgpu_ptxinfo_load_from_string( const char *p_for_info, unsigned source_num ptxinfo_in = fopen(tempfile_ptxinfo,"r"); g_ptxinfo_filename = tempfile_ptxinfo; ptxinfo_parse(); - snprintf(commandline,1024,"rm -f %s %s %s", fname, fname2, tempfile_ptxinfo); - printf("GPGPU-Sim PTX: removing ptxinfo using \"%s\"\n", commandline); - result = system(commandline); - if( result != 0 ) { - printf("GPGPU-Sim PTX: ERROR ** while loading PTX (c) %d\n", result); - exit(1); + if( ! g_save_embedded_ptx ) { + snprintf(commandline,1024,"rm -f %s %s %s", fname, fname2, tempfile_ptxinfo); + printf("GPGPU-Sim PTX: removing ptxinfo using \"%s\"\n", commandline); + result = system(commandline); + if( result != 0 ) { + printf("GPGPU-Sim PTX: ERROR ** while loading PTX (c) %d\n", result); + exit(1); + } } } diff --git a/src/cuda-sim/ptxinfo.l b/src/cuda-sim/ptxinfo.l index 18bf77d..99ee1fc 100644 --- a/src/cuda-sim/ptxinfo.l +++ b/src/cuda-sim/ptxinfo.l @@ -56,6 +56,7 @@ unsigned ptxinfo_col = 0; "lmem" TC; return LMEM; "smem" TC; return SMEM; "cmem" TC; return CMEM; +"gmem" TC; return GMEM; "line" TC; return LINE; "for" TC; return FOR; diff --git a/src/cuda-sim/ptxinfo.y b/src/cuda-sim/ptxinfo.y index e4ba6b2..294412d 100644 --- a/src/cuda-sim/ptxinfo.y +++ b/src/cuda-sim/ptxinfo.y @@ -42,6 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. %token LMEM %token SMEM %token CMEM +%token GMEM %token <string_value> IDENTIFIER %token PLUS %token COMMA @@ -65,6 +66,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. void ptxinfo_function(const char *fname ); void ptxinfo_regs( unsigned nregs ); void ptxinfo_lmem( unsigned declared, unsigned system ); + void ptxinfo_gmem( unsigned declared, unsigned system ); void ptxinfo_smem( unsigned declared, unsigned system ); void ptxinfo_cmem( unsigned nbytes, unsigned bank ); int ptxinfo_error(const char*); @@ -85,9 +87,10 @@ line_info: function_name | function_info { ptxinfo_addinfo(); } ; -function_name: FUNC QUOTE IDENTIFIER QUOTE { ptxinfo_function($3); } - | FUNC QUOTE IDENTIFIER QUOTE FOR QUOTE IDENTIFIER QUOTE { ptxinfo_function($3); } - +function_name: FUNC QUOTE IDENTIFIER QUOTE { ptxinfo_function($3); } + | FUNC QUOTE IDENTIFIER QUOTE FOR QUOTE IDENTIFIER QUOTE {ptxinfo_function($3); } + ; + function_info: info | function_info COMMA info ; @@ -96,6 +99,7 @@ info: USED INT_OPERAND REGS { ptxinfo_regs($2); } | tuple LMEM { ptxinfo_lmem(g_declared,g_system); } | tuple SMEM { ptxinfo_smem(g_declared,g_system); } | INT_OPERAND BYTES CMEM LEFT_SQUARE_BRACKET INT_OPERAND RIGHT_SQUARE_BRACKET { ptxinfo_cmem($1,$5); } + | INT_OPERAND BYTES GMEM { ptxinfo_gmem($1,0); } | INT_OPERAND BYTES LMEM { ptxinfo_lmem($1,0); } | INT_OPERAND BYTES SMEM { ptxinfo_smem($1,0); } | INT_OPERAND BYTES CMEM { ptxinfo_cmem($1,0); } diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index b761dac..d11f12c 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -2392,7 +2392,7 @@ unsigned int shader_core_config::max_cta( const kernel_info_t &k ) const //Limit by n_threads/shader unsigned int result_thread = n_thread_per_shader / padded_cta_size; - const struct gpgpu_ptx_sim_kernel_info *kernel_info = ptx_sim_kernel_info(kernel); + const struct gpgpu_ptx_sim_info *kernel_info = ptx_sim_kernel_info(kernel); //Limit by shmem/shader unsigned int result_shmem = (unsigned)-1; @@ -2412,7 +2412,7 @@ unsigned int shader_core_config::max_cta( const kernel_info_t &k ) const result = gs_min2(result, result_regs); result = gs_min2(result, result_cta); - static const struct gpgpu_ptx_sim_kernel_info* last_kinfo = NULL; + static const struct gpgpu_ptx_sim_info* last_kinfo = NULL; if (last_kinfo != kernel_info) { //Only print out stats if kernel_info struct changes last_kinfo = kernel_info; printf ("GPGPU-Sim uArch: CTA/core = %u, limited by:", result); |
