diff options
| -rw-r--r-- | cuobjdump_to_ptxplus/Makefile | 4 | ||||
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 10 | ||||
| -rw-r--r-- | src/cuda-sim/Makefile | 8 | ||||
| -rw-r--r-- | src/cuda-sim/cuda-sim.cc | 2 | ||||
| -rw-r--r-- | src/cuda-sim/instructions.cc | 2 | ||||
| -rw-r--r-- | src/cuda-sim/ptx_ir.h | 1 | ||||
| -rw-r--r-- | src/gpgpu-sim/addrdec.cc | 2 | ||||
| -rw-r--r-- | src/gpgpu-sim/dram.cc | 1 | ||||
| -rw-r--r-- | src/gpgpu-sim/gpu-cache.h | 1 | ||||
| -rw-r--r-- | src/gpgpu-sim/gpu-sim.cc | 2 | ||||
| -rw-r--r-- | src/gpgpu-sim/local_interconnect.cc | 4 | ||||
| -rw-r--r-- | src/gpgpu-sim/mem_fetch.cc | 8 | ||||
| -rw-r--r-- | src/gpgpu-sim/shader.cc | 2 | ||||
| -rw-r--r-- | src/gpgpu-sim/shader.h | 2 | ||||
| -rw-r--r-- | src/gpgpu-sim/shader_trace.h | 2 | ||||
| -rw-r--r-- | src/intersim2/Makefile | 4 | ||||
| -rw-r--r-- | src/intersim2/networks/dragonfly.cpp | 26 | ||||
| -rw-r--r-- | src/intersim2/networks/flatfly_onchip.cpp | 4 | ||||
| -rw-r--r-- | src/stream_manager.cc | 2 |
19 files changed, 51 insertions, 36 deletions
diff --git a/cuobjdump_to_ptxplus/Makefile b/cuobjdump_to_ptxplus/Makefile index e95136a..0eb7d1e 100644 --- a/cuobjdump_to_ptxplus/Makefile +++ b/cuobjdump_to_ptxplus/Makefile @@ -28,10 +28,10 @@ $(OUTPUT_DIR)/cuobjdump_to_ptxplus: $(OUTPUT_DIR)/cuobjdumpInst.o $(OUTPUT_DIR)/ $(OUTPUT_DIR)/lex.ptx_.c : ptx.l - ${LEX} ${LEXFLAGS} -o$(OUTPUT_DIR)/lex.ptx_.c ptx.l + ${LEX} ${LEXFLAGS} -o$(OUTPUT_DIR)/lex.ptx_.c ptx.l 2> /dev/null $(OUTPUT_DIR)/ptx.tab.c : ptx.y - ${YACC} ${YFLAGS} --name-prefix=ptx_ -v ptx.y --file-prefix=$(OUTPUT_DIR)/ptx + ${YACC} ${YFLAGS} --name-prefix=ptx_ -v ptx.y --file-prefix=$(OUTPUT_DIR)/ptx 2> /dev/null $(OUTPUT_DIR)/ptx.tab.h :$(OUTPUT_DIR)/ptx.tab.c diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 12d3aac..5866b36 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -464,6 +464,10 @@ static int get_app_cuda_version() { " | grep libcudart.so | sed 's/.*libcudart.so.\\(.*\\) =>.*/\\1/' > " + fname; int res = system(app_cuda_version_command.c_str()); + if(res == -1){ + printf("Error - Cannot detect the app's CUDA version.\n"); + exit(1); + } FILE *cmd = fopen(fname, "r"); char buf[256]; while (fgets(buf, sizeof(buf), cmd) != 0) { @@ -3235,6 +3239,11 @@ char *readfile(const std::string filename) { // allocate and copy the entire ptx char *ret = (char *)malloc((filesize + 1) * sizeof(char)); int num = fread(ret, 1, filesize, fp); + if(num == 0){ + std::cout << "ERROR: Could not read data from file %s\n" + << filename << std::endl; + assert(0); + } ret[filesize] = '\0'; fclose(fp); return ret; @@ -3596,6 +3605,7 @@ unsigned CUDARTAPI __cudaPushCallConfiguration(dim3 gridDim, dim3 blockDim, announce_call(__my_func__); } cudaConfigureCallInternal(gridDim, blockDim, sharedMem, stream); + return 0; } cudaError_t CUDARTAPI __cudaPopCallConfiguration(dim3 *gridDim, dim3 *blockDim, diff --git a/src/cuda-sim/Makefile b/src/cuda-sim/Makefile index 01bc480..541cf8f 100644 --- a/src/cuda-sim/Makefile +++ b/src/cuda-sim/Makefile @@ -91,16 +91,16 @@ $(OUTPUT_DIR)/lex.ptxinfo_.o: $(OUTPUT_DIR)/lex.ptxinfo_.c $(OUTPUT_DIR)/ptxinfo $(CPP) -c $(CXX_OPT) $(OUTPUT_DIR)/lex.ptxinfo_.c -o $(OUTPUT_DIR)/lex.ptxinfo_.o $(OUTPUT_DIR)/ptx.tab.c: ptx.y - bison --name-prefix=ptx_ -v -d ptx.y --file-prefix=$(OUTPUT_DIR)/ptx + bison --name-prefix=ptx_ -v -d ptx.y --file-prefix=$(OUTPUT_DIR)/ptx 2> /dev/null $(OUTPUT_DIR)/ptxinfo.tab.c: ptxinfo.y - bison --name-prefix=ptxinfo_ -v -d ptxinfo.y --file-prefix=$(OUTPUT_DIR)/ptxinfo + bison --name-prefix=ptxinfo_ -v -d ptxinfo.y --file-prefix=$(OUTPUT_DIR)/ptxinfo 2> /dev/null $(OUTPUT_DIR)/lex.ptx_.c: ptx.l - flex --outfile=$(OUTPUT_DIR)/lex.ptx_.c ptx.l + flex --outfile=$(OUTPUT_DIR)/lex.ptx_.c ptx.l 2> /dev/null $(OUTPUT_DIR)/lex.ptxinfo_.c: ptxinfo.l - flex --outfile=$(OUTPUT_DIR)/lex.ptxinfo_.c ptxinfo.l + flex --outfile=$(OUTPUT_DIR)/lex.ptxinfo_.c ptxinfo.l 2> /dev/null clean: rm -f *~ *.o *.gcda *.gcno *.gcov libgpgpu_ptx_sim.a \ diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc index b063512..888cf77 100644 --- a/src/cuda-sim/cuda-sim.cc +++ b/src/cuda-sim/cuda-sim.cc @@ -1531,7 +1531,7 @@ void function_info::ptx_jit_config( std::string filename_c(filename + "_c"); snprintf(buff, 1024, "c++filt %s > %s", get_name().c_str(), filename_c.c_str()); - assert(system(buff) != NULL); + assert(system(buff) != 0); FILE *fp = fopen(filename_c.c_str(), "r"); char * ptr = fgets(buff, 1024, fp); if(ptr == NULL ){ diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc index e22d88a..4981c99 100644 --- a/src/cuda-sim/instructions.cc +++ b/src/cuda-sim/instructions.cc @@ -1948,7 +1948,7 @@ void mma_impl(const ptx_instruction *pI, core_t *core, warp_inst_t inst) { hex_val = (v[k / 2].s64 & 0xffff); else hex_val = ((v[k / 2].s64 & 0xffff0000) >> 16); - nw_v[k].f16 = *((half *)&hex_val); + nw_v[k].f16 = *(reinterpret_cast<half*>(hex_val)); } } if (!((operand_num == 3) && (type2 == F32_TYPE))) { diff --git a/src/cuda-sim/ptx_ir.h b/src/cuda-sim/ptx_ir.h index 8251759..7ba7171 100644 --- a/src/cuda-sim/ptx_ir.h +++ b/src/cuda-sim/ptx_ir.h @@ -1248,6 +1248,7 @@ class function_info { const ptx_version &get_ptx_version() const { return m_symtab->get_ptx_version(); } + virtual ~function_info(){} unsigned get_sm_target() const { return m_symtab->get_sm_target(); } bool is_extern() const { return m_extern; } void set_name(const char *name) { m_name = name; } diff --git a/src/gpgpu-sim/addrdec.cc b/src/gpgpu-sim/addrdec.cc index f4f83f9..db27c82 100644 --- a/src/gpgpu-sim/addrdec.cc +++ b/src/gpgpu-sim/addrdec.cc @@ -584,7 +584,7 @@ unsigned next_powerOf2(unsigned n) { n = n - 1; // do till only one bit is left - while (n & n - 1) n = n & (n - 1); // unset rightmost bit + while (n & (n - 1)) n = n & (n - 1); // unset rightmost bit // n is now a power of two (less than n) diff --git a/src/gpgpu-sim/dram.cc b/src/gpgpu-sim/dram.cc index 662c2ed..53c8238 100644 --- a/src/gpgpu-sim/dram.cc +++ b/src/gpgpu-sim/dram.cc @@ -880,4 +880,5 @@ unsigned dram_t::get_bankgrp_number(unsigned i) { } else { assert(1); } + return 0; // we should never get here } diff --git a/src/gpgpu-sim/gpu-cache.h b/src/gpgpu-sim/gpu-cache.h index aa693b5..ad41320 100644 --- a/src/gpgpu-sim/gpu-cache.h +++ b/src/gpgpu-sim/gpu-cache.h @@ -499,6 +499,7 @@ struct sector_cache_block : public cache_block_t { for (unsigned i = 0; i < SECTOR_CHUNCK_SIZE; ++i) { if (sector_mask.to_ulong() & (1 << i)) return i; } + return SECTOR_CHUNCK_SIZE; //error } }; diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc index ea50fa0..47c0b4a 100644 --- a/src/gpgpu-sim/gpu-sim.cc +++ b/src/gpgpu-sim/gpu-sim.cc @@ -80,7 +80,7 @@ class gpgpu_sim_wrapper {}; #include <sstream> #include <string> -#define MAX(a, b) (((a) > (b)) ? (a) : (b)) +// #define MAX(a, b) (((a) > (b)) ? (a) : (b)) //redefined bool g_interactive_debugger_enabled = false; diff --git a/src/gpgpu-sim/local_interconnect.cc b/src/gpgpu-sim/local_interconnect.cc index df6bd7b..fe7bc74 100644 --- a/src/gpgpu-sim/local_interconnect.cc +++ b/src/gpgpu-sim/local_interconnect.cc @@ -148,8 +148,8 @@ void xbar_router::RR_Advance() { } } } - - next_node_id = (++next_node_id % total_nodes); + next_node_id = next_node_id + 1 ; + next_node_id = (next_node_id % total_nodes); conflicts += conflict_sub; if (active) { diff --git a/src/gpgpu-sim/mem_fetch.cc b/src/gpgpu-sim/mem_fetch.cc index 456d891..0d86046 100644 --- a/src/gpgpu-sim/mem_fetch.cc +++ b/src/gpgpu-sim/mem_fetch.cc @@ -84,10 +84,10 @@ mem_fetch::~mem_fetch() { m_status = MEM_FETCH_DELETED; } #undef MF_TUP_END void mem_fetch::print(FILE *fp, bool print_inst) const { - if (this == NULL) { - fprintf(fp, " <NULL mem_fetch pointer>\n"); - return; - } + // if (this == NULL) { // doenst make sense! + // fprintf(fp, " <NULL mem_fetch pointer>\n"); + // return; + // } fprintf(fp, " mf: uid=%6u, sid%02u:w%02u, part=%u, ", m_request_uid, m_sid, m_wid, m_raw_addr.chip); m_access.print(fp); diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index f756aec..79be857 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -481,7 +481,7 @@ shader_core_ctx::shader_core_ctx(class gpgpu_sim *gpu, m_config = config; m_memory_config = mem_config; m_stats = stats; - unsigned warp_size = config->warp_size; + // unsigned warp_size = config->warp_size; Issue_Prio = 0; m_sid = shader_id; diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h index fd4fc1f..8c75cf0 100644 --- a/src/gpgpu-sim/shader.h +++ b/src/gpgpu-sim/shader.h @@ -351,8 +351,8 @@ class scheduler_unit { // this can be copied freely, so can be used in std m_sfu_out(sfu_out), m_int_out(int_out), m_tensor_core_out(tensor_core_out), - m_spec_cores_out(spec_cores_out), m_mem_out(mem_out), + m_spec_cores_out(spec_cores_out), m_id(id) {} virtual ~scheduler_unit() {} virtual void add_supervised_warp_id(int i) { diff --git a/src/gpgpu-sim/shader_trace.h b/src/gpgpu-sim/shader_trace.h index e7486d8..367262c 100644 --- a/src/gpgpu-sim/shader_trace.h +++ b/src/gpgpu-sim/shader_trace.h @@ -38,7 +38,7 @@ #define SCHED_PRINT_STR SHADER_PRINT_STR "Scheduler %d - " #define SHADER_DTRACE(x) \ (DTRACE(x) && \ - (Trace::sampling_core == get_sid() || Trace::sampling_core == -1)) + (Trace::sampling_core == (int)get_sid() || Trace::sampling_core == -1)) // Intended to be called from inside components of a shader core. // Depends on a get_sid() function diff --git a/src/intersim2/Makefile b/src/intersim2/Makefile index 3eeeb70..dad436a 100644 --- a/src/intersim2/Makefile +++ b/src/intersim2/Makefile @@ -136,10 +136,10 @@ depend: makedepend -f$(OBJDIR)/Makefile.makedepend -I$(INCPATH) -p$(OBJDIR)/ $(ALL_SRCS) 2> /dev/null ${LEX_OBJS}: $(OBJDIR)/lex.yy.c $(OBJDIR)/y.tab.h - $(CC) $(CPPFLAGS) -c $< -o $@ + $(CC) -Wno-unused-function $(CPPFLAGS) -c $< -o $@ ${YACC_OBJS}: $(OBJDIR)/y.tab.c $(OBJDIR)/y.tab.h - $(CC) $(CPPFLAGS) -c $< -o $@ + $(CC) -Wno-unused-function $(CPPFLAGS) -c $< -o $@ ${OBJDIR}/%.o: %.cpp $(CXX) $(CPPFLAGS) -c $< -o $@ diff --git a/src/intersim2/networks/dragonfly.cpp b/src/intersim2/networks/dragonfly.cpp index 01a2281..f5b637e 100644 --- a/src/intersim2/networks/dragonfly.cpp +++ b/src/intersim2/networks/dragonfly.cpp @@ -111,7 +111,7 @@ int dragonfly_port(int rID, int source, int dest){ int dest_grp_ID = int(dest/_grp_num_nodes); int grp_output=-1; int grp_RID=-1; - int group_dest=-1; + // int group_dest=-1; //which router within this group the packet needs to go to if (dest_grp_ID == grp_ID) { @@ -123,7 +123,7 @@ int dragonfly_port(int rID, int source, int dest){ grp_output = dest_grp_ID - 1; } grp_RID = int(grp_output /gP) + grp_ID * _grp_num_routers; - group_dest = grp_RID * gP; + // group_dest = grp_RID * gP; } //At the last hop @@ -221,7 +221,7 @@ void DragonFlyNew::_BuildNet( const Configuration &config ) int _input=-1; int _dim_ID=-1; int _num_ports_per_switch=-1; - int _dim_size=-1; + // int _dim_size=-1; int c; ostringstream router_name; @@ -314,7 +314,7 @@ void DragonFlyNew::_BuildNet( const Configuration &config ) // intra-group GROUP channels for ( int dim = 0; dim < _n; ++dim ) { - _dim_size = powi(_k,dim); + // _dim_size = powi(_k,dim); _dim_ID = ((int) (node / ( powi(_p, dim)))); @@ -356,16 +356,16 @@ void DragonFlyNew::_BuildNet( const Configuration &config ) // add INPUT channels -- "optical" channels connecting the groups - int _grp_num_routers; + // int _grp_num_routers; int grp_output; - int grp_ID2; + // int grp_ID2; for ( int cnt = 0; cnt < _p; ++cnt ) { // _dim_ID grp_output = _dim_ID* _p + cnt; - _grp_num_routers = powi(_k, _n-1); - grp_ID2 = (int) ((grp_ID - 1) / (_k - 1)); + // _grp_num_routers = powi(_k, _n-1); + // grp_ID2 = (int) ((grp_ID - 1) / (_k - 1)); if ( grp_ID > grp_output) { @@ -495,8 +495,8 @@ void ugal_dragonflynew( const Router *r, const Flit *f, int in_channel, int debug = f->watch; int out_port = -1; int out_vc = 0; - int min_queue_size, min_hopcnt; - int nonmin_queue_size, nonmin_hopcnt; + int min_queue_size; //, min_hopcnt; + int nonmin_queue_size; //, nonmin_hopcnt; int intm_grp_ID; int intm_rID; @@ -523,13 +523,13 @@ void ugal_dragonflynew( const Router *r, const Flit *f, int in_channel, f->ph = 1; } else { //congestion metrics using queue length, obtained by GetUsedCredit() - min_hopcnt = dragonflynew_hopcnt(f->src, f->dest); + // min_hopcnt = dragonflynew_hopcnt(f->src, f->dest); min_router_output = dragonfly_port(rID, f->src, f->dest); min_queue_size = max(r->GetUsedCredit(min_router_output), 0) ; - nonmin_hopcnt = dragonflynew_hopcnt(f->src, f->intm) + - dragonflynew_hopcnt(f->intm,f->dest); + // nonmin_hopcnt = dragonflynew_hopcnt(f->src, f->intm) + + // dragonflynew_hopcnt(f->intm,f->dest); nonmin_router_output = dragonfly_port(rID, f->src, f->intm); nonmin_queue_size = max(r->GetUsedCredit(nonmin_router_output), 0); diff --git a/src/intersim2/networks/flatfly_onchip.cpp b/src/intersim2/networks/flatfly_onchip.cpp index fd17c1a..df43371 100644 --- a/src/intersim2/networks/flatfly_onchip.cpp +++ b/src/intersim2/networks/flatfly_onchip.cpp @@ -1204,7 +1204,7 @@ void ugal_pni_flatfly_onchip( const Router *r, const Flit *f, int in_channel, int find_distance (int src, int dest) { int dist = 0; int _dim = gN; - int _dim_size; + // int _dim_size; int src_tmp= (int) src / gC; int dest_tmp = (int) dest / gC; @@ -1212,7 +1212,7 @@ int find_distance (int src, int dest) { // cout << " HOP CNT between src: " << src << " dest: " << dest; for (int d=0;d < _dim; d++) { - _dim_size = powi(gK, d )*gC; + // _dim_size = powi(gK, d )*gC; //if ((int)(src / _dim_size) != (int)(dest / _dim_size)) // dist++; src_id = src_tmp % gK; diff --git a/src/stream_manager.cc b/src/stream_manager.cc index e99bf87..0ce3c6a 100644 --- a/src/stream_manager.cc +++ b/src/stream_manager.cc @@ -227,6 +227,8 @@ void stream_operation::print(FILE *fp) const { case stream_no_op: fprintf(fp, "no-op"); break; + default: + break; } } |
