From cd9ee070e2fcaa49fe35944ea0fd60ed5d197ba2 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Mon, 19 Feb 2024 20:39:39 -0500 Subject: Split SAFE() macro into API-specific typed variants Avoids incorrectly interpreting CUDA Driver Library error codes as though they were CUDA Runtime Library error codes (the numbering is similar, but not identical). Also cleans up how we initialize and terminate a context for capability checking in `mon_cross_ctx_copies`. --- preemption_logger.cu | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'preemption_logger.cu') diff --git a/preemption_logger.cu b/preemption_logger.cu index 667c459..d93600e 100644 --- a/preemption_logger.cu +++ b/preemption_logger.cu @@ -27,7 +27,7 @@ struct interval { }; // Minimum time discontinuity which indicates a gap between intervals -// One clock tick is about 1ns +// Clock resolution is about 1ns, but it only ticks every 1us pre-H100 #define MIN_PREEMPT_TICKS 2*1000 // ~2us // Watch for discontinuities in the GPU clock, indicating intervals during @@ -67,7 +67,6 @@ Spin on the GPU, logging intervals to stdout during which we are scheduled.\n\ -r, --raw Print raw logged GPU times (skip conversion to CPU time).\n"; int main(int argc, char **argv) { - cudaError_t err; // Needed for the SAFE() macro struct interval *ivls_gpu, *ivls; struct timespec start, end, end_ivls_only; int num_ivls, skip_conversion; -- cgit v1.2.2