Skip to content

Commit db20399

Browse files
author
Amr Akmal Moustafa Abouelmagd
committed
TESTING only: enforce larger time span for kernel execution
1 parent cda4247 commit db20399

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/stream/TRIAD-Hip.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,28 @@ void TRIAD::runHipVariantImpl(VariantID vid)
8282
stopTimer();
8383

8484
} else if ( vid == RAJA_HIP ) {
85+
86+
RepIndex_type temp_count = 0;
8587

8688
startTimer();
89+
8790
for (RepIndex_type irep = 0; irep < run_reps; ++irep) {
8891

8992
RAJA::forall< RAJA::hip_exec<block_size, true /*async*/> >( res,
9093
RAJA::RangeSegment(ibegin, iend), [=] __device__ (Index_type i) {
91-
TRIAD_BODY;
92-
});
9394

95+
for (RepIndex_type extra_rep = 0; extra_rep < 5; ++extra_rep) {
96+
temp_count += extra_rep * (extra_rep & 1);
97+
TRIAD_BODY;
98+
}
99+
100+
});
94101
}
102+
95103
stopTimer();
96104

105+
getCout() << "\n Dummy print preventing compiler optimization: " << temp_count << std::endl;
106+
97107
} else {
98108
getCout() << "\n TRIAD : Unknown Hip variant id = " << vid << std::endl;
99109
}

0 commit comments

Comments
 (0)