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] --- decuda_to_ptxplus/ptx_parser.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'decuda_to_ptxplus/ptx_parser.h') diff --git a/decuda_to_ptxplus/ptx_parser.h b/decuda_to_ptxplus/ptx_parser.h index c429ead..bed82bb 100644 --- a/decuda_to_ptxplus/ptx_parser.h +++ b/decuda_to_ptxplus/ptx_parser.h @@ -37,6 +37,14 @@ #define NON_ARRAY_IDENTIFIER 1 #define ARRAY_IDENTIFIER_NO_DIM 2 #define ARRAY_IDENTIFIER 3 +#define P_DEBUG 1 +#define DPRINTF(...) \ + if(P_DEBUG) { \ + printf("(%s:%u) ", __FILE__, __LINE__); \ + printf(__VA_ARGS__); \ + printf("\n"); \ + fflush(stdout); \ + } enum _memory_space_t { @@ -128,21 +136,30 @@ void add_function_name( const char *headerInput ) //void add_space_spec(int headerInput) void add_space_spec( enum _memory_space_t spec, int value ) { + DPRINTF("add_space_spec: spec=%u", spec); + decudaInst *instEntry; switch(spec) { case param_space_unclassified: if(inEntryDirective && inParamDirective) { - decudaInst *instEntry = new decudaInst(); + instEntry = new decudaInst(); instEntry->setBase(".param"); g_headerList->add(instEntry); } break; case tex_space: inTexDirective = true; - decudaInst *instEntry = new decudaInst(); + instEntry = new decudaInst(); instEntry->setBase(".tex"); g_headerList->add(instEntry); break; + case const_space: + if(inEntryDirective) { + instEntry = new decudaInst(); + instEntry->setBase(".const"); + g_headerList->add(instEntry); + } + break; } } @@ -277,6 +294,7 @@ void func_header(const char* headerBase) // If start of an entry if((strcmp(headerBase, ".entry")==0)||(strcmp(headerBase, ".func")==0)) { + inEntryDirective = true; g_headerList->addEntry(""); decudaInst *instEntry = new decudaInst(); -- cgit v1.3