From 8c2954c263b4cfd756188362919c1a16a7189788 Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Fri, 8 Oct 2010 07:21:51 -0800 Subject: 1. refactoring cuda api code for loading PTX (removing external PTX loading entirely) 2. some bug fixes for warp_inst_t 3. creating a new class, gpgpu_t, which contains the functional "memory" state visible to all threads running on a GPU (doing this as part of my continuing effort to hunt down and eradicate every global variable that is not the top level "the gpu") 4. other misc. changes Almost passing CUDA 3.1 regression? oclHistogram keeps failing under torque, but does not fail when run on the command line from the same directory. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7827] --- src/abstract_hardware_model.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/abstract_hardware_model.cc') diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc index f5149eb..a0e21f7 100644 --- a/src/abstract_hardware_model.cc +++ b/src/abstract_hardware_model.cc @@ -1,4 +1,5 @@ #include "abstract_hardware_model.h" +#include "cuda-sim/memory.h" void move_warp( warp_inst_t *&dst, warp_inst_t *&src ) { @@ -9,3 +10,12 @@ void move_warp( warp_inst_t *&dst, warp_inst_t *&src ) src->clear(); } +gpgpu_t::gpgpu_t() +{ + g_global_mem = new memory_space_impl<8192>("global",64*1024); + g_param_mem = new memory_space_impl<8192>("param",64*1024); + g_tex_mem = new memory_space_impl<8192>("tex",64*1024); + g_surf_mem = new memory_space_impl<8192>("surf",64*1024); + + g_dev_malloc=GLOBAL_HEAP_START; +} -- cgit v1.3