diff options
| author | Mengchi Zhang <[email protected]> | 2019-07-15 12:16:01 -0400 |
|---|---|---|
| committer | Mengchi Zhang <[email protected]> | 2019-07-15 12:16:01 -0400 |
| commit | bd170826a00fe1ea1960ff2e23247ed3f980547b (patch) | |
| tree | ba7b8405d75c3b135e7d8c4e0b7ceb79f960807d | |
| parent | 67950eb12eec495b1976934acc763db481d955f8 (diff) | |
Move kernel_info_t::m_next_uid
Signed-off-by: Mengchi Zhang <[email protected]>
| -rw-r--r-- | libcuda/gpgpu_context.h | 2 | ||||
| -rw-r--r-- | src/abstract_hardware_model.cc | 3 | ||||
| -rw-r--r-- | src/abstract_hardware_model.h | 1 |
3 files changed, 3 insertions, 3 deletions
diff --git a/libcuda/gpgpu_context.h b/libcuda/gpgpu_context.h index 9c5ae7b..1e20c62 100644 --- a/libcuda/gpgpu_context.h +++ b/libcuda/gpgpu_context.h @@ -14,6 +14,7 @@ class gpgpu_context { sm_next_access_uid=0; warp_inst_sm_next_uid=0; operand_info_sm_next_uid = 1; + kernel_info_m_next_uid = 1; api = new cuda_runtime_api(this); ptxinfo = new ptxinfo_data(this); ptx_parser = new ptx_recognizer(this); @@ -27,6 +28,7 @@ class gpgpu_context { unsigned sm_next_access_uid; unsigned warp_inst_sm_next_uid; unsigned operand_info_sm_next_uid;//uid for operand_info + unsigned kernel_info_m_next_uid;//uid for kernel_info_t // objects pointers for each file cuda_runtime_api* api; ptxinfo_data* ptxinfo; diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc index 1dddecd..733d602 100644 --- a/src/abstract_hardware_model.cc +++ b/src/abstract_hardware_model.cc @@ -709,7 +709,6 @@ void warp_inst_t::completed( unsigned long long cycle ) const ptx_file_line_stats_add_latency(pc, latency * active_count()); } -unsigned kernel_info_t::m_next_uid = 1; /*A snapshot of the texture mappings needs to be stored in the kernel's info as kernels should use the texture bindings seen at the time of launch and textures @@ -724,7 +723,7 @@ kernel_info_t::kernel_info_t( dim3 gridDim, dim3 blockDim, class function_info * m_next_cta.z=0; m_next_tid=m_next_cta; m_num_cores_running=0; - m_uid = m_next_uid++; + m_uid = (entry->gpgpu_ctx->kernel_info_m_next_uid)++; m_param_mem = new memory_space_impl<8192>("param",64*1024); //Jin: parent and child kernel management for CDP diff --git a/src/abstract_hardware_model.h b/src/abstract_hardware_model.h index 519416d..d13b8c6 100644 --- a/src/abstract_hardware_model.h +++ b/src/abstract_hardware_model.h @@ -299,7 +299,6 @@ private: class function_info *m_kernel_entry; unsigned m_uid; - static unsigned m_next_uid; //These maps contain the snapshot of the texture mappings at kernel launch std::map<std::string, const struct cudaArray*> m_NameToCudaArray; |
