summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMahmoud <[email protected]>2018-11-06 18:34:36 -0500
committerMahmoud <[email protected]>2018-11-06 18:34:36 -0500
commitffee4550d7452af93d3dcd05fc9a105a56b5b077 (patch)
treea7dac9173c34e882a71df408859cd98130c57330 /src
parent2823b21ea0b84555c0f0c9b8a6e02614bf80f941 (diff)
fixing sector atomics
Diffstat (limited to 'src')
-rw-r--r--src/abstract_hardware_model.cc27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc
index 39ed81c..40f4d00 100644
--- a/src/abstract_hardware_model.cc
+++ b/src/abstract_hardware_model.cc
@@ -314,7 +314,7 @@ void warp_inst_t::generate_mem_accesses()
break;
case global_space: case local_space: case param_space_local:
- if( m_config->gpgpu_coalesce_arch >= 13 && m_config->gpgpu_coalesce_arch <= 62) {
+ if( m_config->gpgpu_coalesce_arch >= 13) {
if(isatomic())
memory_coalescing_arch_atomic(is_write, access_type);
else
@@ -369,7 +369,7 @@ void warp_inst_t::memory_coalescing_arch( bool is_write, mem_access_type access_
}
else if(m_config->gpgpu_coalesce_arch >= 40)
{
- //Maxwell and Pascal, L1 and L2 are sectors
+ //Maxwell, Pascal and Volta, L1 and L2 are sectors
//all requests should be 32 bytes
sector_segment_size = true;
}
@@ -440,11 +440,28 @@ void warp_inst_t::memory_coalescing_arch_atomic( bool is_write, mem_access_type
// see the CUDA manual where it discusses coalescing rules before reading this
unsigned segment_size = 0;
- unsigned warp_parts = 2;
+ unsigned warp_parts = m_config->mem_warp_parts;
+ bool sector_segment_size = false;
+
+ if(m_config->gpgpu_coalesce_arch >= 20 && m_config->gpgpu_coalesce_arch < 39)
+ {
+ //Fermi and Kepler, L1 is normal and L2 is sector
+ if(m_config->gmem_skip_L1D || cache_op == CACHE_GLOBAL)
+ sector_segment_size = true;
+ else
+ sector_segment_size = false;
+ }
+ else if(m_config->gpgpu_coalesce_arch >= 40)
+ {
+ //Maxwell, Pascal and Volta, L1 and L2 are sectors
+ //all requests should be 32 bytes
+ sector_segment_size = true;
+ }
+
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;