aboutsummaryrefslogtreecommitdiff
path: root/src/cuda-sim/cuda_device_runtime.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cuda-sim/cuda_device_runtime.cc')
-rw-r--r--src/cuda-sim/cuda_device_runtime.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cuda-sim/cuda_device_runtime.cc b/src/cuda-sim/cuda_device_runtime.cc
index 917e7a8..be8369f 100644
--- a/src/cuda-sim/cuda_device_runtime.cc
+++ b/src/cuda-sim/cuda_device_runtime.cc
@@ -18,6 +18,7 @@ unsigned long long g_max_total_param_size = 0;
#include "cuda-sim.h"
#include "ptx_ir.h"
#include "../stream_manager.h"
+#include "../gpgpusim_entrypoint.h"
#include "cuda_device_runtime.h"
#define DEV_RUNTIME_REPORT(a) \
@@ -64,7 +65,7 @@ public:
std::map<void *, device_launch_config_t> g_cuda_device_launch_param_map;
std::list<device_launch_operation_t> g_cuda_device_launch_op;
-extern stream_manager *g_stream_manager;
+//extern stream_manager *g_stream_manager();
//Handling device runtime api:
//void * cudaGetParameterBufferV2(void *func, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize)
@@ -200,7 +201,7 @@ void gpgpusim_cuda_launchDeviceV2(const ptx_instruction * pI, ptx_thread_info *
//create child kernel_info_t and index it with parameter_buffer address
gpgpu_t* gpu=thread->get_gpu();
device_grid = new kernel_info_t(config.grid_dim, config.block_dim, device_kernel_entry, gpu->getNameArrayMapping(), gpu->getNameInfoMapping());
- device_grid->launch_cycle = gpu_sim_cycle + gpu_tot_sim_cycle;
+ device_grid->launch_cycle = gpu->gpu_sim_cycle + gpu->gpu_tot_sim_cycle;
kernel_info_t & parent_grid = thread->get_kernel();
DEV_RUNTIME_REPORT("child kernel launched by " << parent_grid.name() << ", cta (" <<
thread->get_ctaid().x << ", " << thread->get_ctaid().y << ", " << thread->get_ctaid().z <<
@@ -322,7 +323,7 @@ void launch_one_device_kernel() {
device_launch_operation_t &op = g_cuda_device_launch_op.front();
stream_operation stream_op = stream_operation(op.grid, g_ptx_sim_mode, op.stream);
- g_stream_manager->push(stream_op);
+ g_stream_manager()->push(stream_op);
g_cuda_device_launch_op.pop_front();
}
}