#include "Shared/funcannotations.h"
#include <cstdint>
Go to the source code of this file.
Definition at line 115 of file cuda_mapd_rt.cu.
127 __shared__
volatile int64_t dw_block_cycle_start;
128 __shared__
volatile bool
135 if (threadIdx.x == 0) {
136 dw_block_cycle_start = 0LL;
137 int64_t cycle_count =
static_cast<int64_t
>(clock64());
140 dw_block_cycle_start =
static_cast<int64_t
>(
143 static_cast<unsigned long long>(cycle_count)));
146 int64_t cycles = cycle_count - dw_block_cycle_start;
147 if ((smid ==
get_smid()) && (dw_block_cycle_start > 0LL) &&
150 dw_should_terminate =
true;
152 dw_should_terminate =
false;
156 return dw_should_terminate;
__device__ int64_t dw_sm_cycle_start[128]
__device__ int64_t dw_cycle_budget
__inline__ __device__ uint32_t get_smid(void)
__device__ int32_t dw_abort
Definition at line 36 of file DynamicWatchdog.cpp.
References DW_ABORT, dw_abort, dw_cycle_budget, DW_DEADLINE, DW_RESET, read_cycle_counter(), and VLOG.
Referenced by dynamic_watchdog(), Executor::interrupt(), Executor::resetInterrupt(), and ExecutionKernel::runImpl().
37 static uint64_t dw_cycle_start = 0ULL;
39 static std::atomic_bool
dw_abort{
false};
41 if (ms_budget == static_cast<unsigned>(
DW_DEADLINE)) {
47 if (ms_budget == static_cast<unsigned>(
DW_ABORT)) {
51 if (ms_budget == static_cast<unsigned>(
DW_RESET)) {
58 std::this_thread::sleep_for(std::chrono::milliseconds(1));
60 dw_cycle_budget = freq_kHz *
static_cast<uint64_t
>(ms_budget);
61 VLOG(1) <<
"INIT: thread " << std::this_thread::get_id() <<
": ms_budget " << ms_budget
62 <<
", cycle_start " << dw_cycle_start <<
", cycle_budget " << dw_cycle_budget
__device__ int64_t dw_cycle_budget
static FORCE_INLINE uint64_t read_cycle_counter(void)
__device__ int32_t dw_abort