@@ -92,7 +92,7 @@ namespace TransferBench
9292 using std::set;
9393 using std::vector;
9494
95- constexpr char VERSION [] = " 1.67 " ;
95+ constexpr char VERSION [] = " 1.68 " ;
9696
9797 /* *
9898 * Enumeration of supported Executor types
@@ -5036,24 +5036,28 @@ static bool IsConfiguredGid(union ibv_gid const& gid)
50365036 }
50375037 }
50385038 }
5039- // Allows for numSubiterations == 0 to run infinitely
5040- if (++subIterations == numSubIterations) break ;
5041- }
50425039
5043- // Wait for all threads to finish
5044- if (seType == 1 ) {
5045- // For warp-level, sync within warp only
5040+ // Wait for all threads to finish this subiteration
5041+ if (seType == 1 ) {
5042+ // For warp-level, sync within warp only
50465043#if defined(__HIP_PLATFORM_AMD__) && (HIP_VERSION_MAJOR < 7)
5047- __builtin_amdgcn_wave_barrier ();
5044+ __builtin_amdgcn_wave_barrier ();
50485045#else
5049- __syncwarp ();
5046+ __syncwarp ();
50505047#endif
5051- } else {
5052- // For threadblock-level, sync all threads
5053- __syncthreads ();
5048+ } else {
5049+ // For threadblock-level, sync all threads
5050+ __syncthreads ();
5051+ }
5052+
5053+ // Allows for numSubiterations == 0 to run infinitely
5054+ if (++subIterations == numSubIterations) break ;
50545055 }
50555056
50565057 if (shouldRecordTiming) {
5058+ // Previous sync ensures data from all threads in this subexecutor has landed in cache
5059+ // so only one thread needs to do system level threadfence.
5060+ __threadfence_system ();
50575061 p.stopCycle = GetTimestamp ();
50585062 p.startCycle = startCycle;
50595063 GetHwId (p.hwId );
@@ -5213,25 +5217,28 @@ static bool IsConfiguredGid(union ibv_gid const& gid)
52135217 }
52145218 }
52155219 }
5216- // Allows for numSubiterations == 0 to run infinitely
5217- if (++subIterations == numSubIterations) break ;
5218- }
52195220
5220- // Wait for all threads to finish
5221- if (seType == 1 ) {
5222- // For warp-level, sync within warp only
5221+ // Wait for all threads to finish this subiteration
5222+ if (seType == 1 ) {
5223+ // For warp-level, sync within warp only
52235224#if defined(__HIP_PLATFORM_AMD__) && (HIP_VERSION_MAJOR < 7)
5224- __builtin_amdgcn_wave_barrier ();
5225+ __builtin_amdgcn_wave_barrier ();
52255226#else
5226-
5227- __syncwarp ();
5227+ __syncwarp ();
52285228#endif
5229- } else {
5230- // For threadblock-level, sync all threads
5231- __syncthreads ();
5229+ } else {
5230+ // For threadblock-level, sync all threads
5231+ __syncthreads ();
5232+ }
5233+
5234+ // Allows for numSubiterations == 0 to run infinitely
5235+ if (++subIterations == numSubIterations) break ;
52325236 }
52335237
52345238 if (shouldRecordTiming) {
5239+ // Previous sync ensures data from all threads in this subexecutor has landed in cache
5240+ // so only one thread needs to do system level threadfence.
5241+ __threadfence_system ();
52355242 p.stopCycle = GetTimestamp ();
52365243 p.startCycle = startCycle;
52375244 GetHwId (p.hwId );
@@ -5459,11 +5466,13 @@ static bool IsConfiguredGid(union ibv_gid const& gid)
54595466 std::set<std::pair<int , int >> CUs;
54605467
54615468 for (auto subExecIdx : rss.subExecIdx ) {
5462- minStartCycle = std::min (minStartCycle, exeInfo.subExecParamGpu [subExecIdx].startCycle );
5463- maxStopCycle = std::max (maxStopCycle, exeInfo.subExecParamGpu [subExecIdx].stopCycle );
5464- if (cfg.general .recordPerIteration ) {
5465- CUs.insert (std::make_pair (exeInfo.subExecParamGpu [subExecIdx].xccId ,
5466- GetId (exeInfo.subExecParamGpu [subExecIdx].hwId )));
5469+ if (exeInfo.subExecParamCpu [subExecIdx].N != 0 ) {
5470+ minStartCycle = std::min (minStartCycle, exeInfo.subExecParamGpu [subExecIdx].startCycle );
5471+ maxStopCycle = std::max (maxStopCycle, exeInfo.subExecParamGpu [subExecIdx].stopCycle );
5472+ if (cfg.general .recordPerIteration ) {
5473+ CUs.insert (std::make_pair (exeInfo.subExecParamGpu [subExecIdx].xccId ,
5474+ GetId (exeInfo.subExecParamGpu [subExecIdx].hwId )));
5475+ }
54675476 }
54685477 }
54695478
0 commit comments