summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/shader.h
diff options
context:
space:
mode:
authorJin Wang <[email protected]>2014-11-14 22:11:52 -0500
committerJin Wang <[email protected]>2016-07-06 02:17:16 -0400
commit9c0384c1626205b4a9ed97f998b3d4d8e7758198 (patch)
tree287a79f0abd3f2a36f920549126095c0974e2715 /src/gpgpu-sim/shader.h
parentbbcb492c0f6d887c4034bd15adf57420dd735c5e (diff)
BUG: concurrent kernels on same SM may occupy warps from running CTAs
Diffstat (limited to 'src/gpgpu-sim/shader.h')
-rw-r--r--src/gpgpu-sim/shader.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h
index 882868e..bdd8dbe 100644
--- a/src/gpgpu-sim/shader.h
+++ b/src/gpgpu-sim/shader.h
@@ -1766,7 +1766,7 @@ public:
virtual void checkExecutionStatusAndUpdate(warp_inst_t &inst, unsigned t, unsigned tid);
address_type next_pc( int tid ) const;
void fetch();
- void register_cta_thread_exit( unsigned cta_num, kernel_info_t * kernel );
+ void register_cta_thread_exit(unsigned cta_num, kernel_info_t * kernel );
void decode();
@@ -1853,13 +1853,15 @@ public:
public:
bool can_issue_1block(kernel_info_t & kernel);
bool occupy_shader_resource_1block(kernel_info_t & kernel, bool occupy);
- void release_shader_resource_1block(kernel_info_t & kernel);
- int find_available_hwtid(unsigned int cta_size);
+ void release_shader_resource_1block(unsigned hw_ctaid, kernel_info_t & kernel);
+ int find_available_hwtid(unsigned int cta_size, bool occupy);
private:
unsigned int m_occupied_n_threads;
unsigned int m_occupied_shmem;
unsigned int m_occupied_regs;
unsigned int m_occupied_ctas;
+ std::bitset<MAX_THREAD_PER_SM> m_occupied_hwtid;
+ std::map<unsigned int, unsigned int> m_occupied_cta_to_hwtid;
};