summaryrefslogtreecommitdiff
path: root/src/abstract_hardware_model.cc
diff options
context:
space:
mode:
authorMahmoud <[email protected]>2017-10-11 20:05:51 -0400
committerMahmoud <[email protected]>2017-10-11 20:58:12 -0400
commit928351f92300b3517c96f5fabff02b245c87044a (patch)
tree12b4e8e120ee24fe7cb0f55c159d7e38efabd34c /src/abstract_hardware_model.cc
parent57b0578fcf9f38fdf6ef2828f2ff71e30c7d7098 (diff)
parente643e2e56344db6264b17d7ffce28f22c8fbabe8 (diff)
Merge branch 'dev-purdue-integration' of https://github.rcac.purdue.edu/abdallm/gpgpu-sim_distribution into dev-purdue-integration
Diffstat (limited to 'src/abstract_hardware_model.cc')
-rw-r--r--src/abstract_hardware_model.cc37
1 files changed, 14 insertions, 23 deletions
diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc
index 64eb43c..51265fd 100644
--- a/src/abstract_hardware_model.cc
+++ b/src/abstract_hardware_model.cc
@@ -356,37 +356,28 @@ void warp_inst_t::memory_coalescing_arch( bool is_write, mem_access_type access_
{
// see the CUDA manual where it discusses coalescing rules before reading this
unsigned segment_size = 0;
- unsigned warp_parts;
+ unsigned warp_parts = m_config->mem_warp_parts;
+ bool sector_segment_size = false;
- //TO DO: need to double check how doubles are coalesced!
- if(data_size == 1)
+ if(m_config->gpgpu_coalesce_arch >= 20 && m_config->gpgpu_coalesce_arch < 39)
{
- //If it is byte data, then coalesce on the whole 32 threads, regardless the arch version
- warp_parts = 1;
- }
- else if(m_config->gpgpu_coalesce_arch == 13)
- {
- //mem_warp_parts should equal 2 for arch=13
- //use the parameter mem_warp_parts for arch=13 to ensure it is backward compatibility with older gpgpu config files
- warp_parts = m_config->mem_warp_parts;
- }
- else if(m_config->gpgpu_coalesce_arch == 20)
- {
- //It is expected that L1_warp_parts_non_cached = 4 and L1_warp_parts_cached = 1 for arch=20
- //non cached, coalesce on 8 threads to generate 32 bytes accesses
- //cached, coalesce on 32 threads to generate 128 bytes accesses
+ //Fermi and Kepler, L1 is normal and L2 is sector
if(m_config->gmem_skip_L1D || cache_op == CACHE_GLOBAL)
- warp_parts = m_config->L1_warp_parts_non_cached;
+ sector_segment_size = true;
else
- warp_parts = m_config->L1_warp_parts_cached;
+ sector_segment_size = false;
+ }
+ else if(m_config->gpgpu_coalesce_arch >= 40)
+ {
+ //Maxwell and Pascal, L1 and L2 are sectors
+ //all requests should be 32 bytes
+ sector_segment_size = true;
}
- else
- abort();
switch( data_size ) {
case 1: segment_size = 32; break;
- case 2: segment_size = 64; break;
- case 4: case 8: case 16: segment_size = 128; break;
+ case 2: segment_size = sector_segment_size? 32 : 64; break;
+ case 4: case 8: case 16: segment_size = sector_segment_size? 32 : 128; break;
}
unsigned subwarp_size = m_config->warp_size / warp_parts;