From e415e282be53a3d8264b67d22b4b15b518f71099 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Thu, 6 Jul 2023 11:45:59 -0400 Subject: Add preemption_logger benchmark, make target, and fix d82c60c Benchmark supports: => Spinning on-GPU until some number of preemptions have occured => Monitoring GPU scheduling by logging preempt and resume times => Logging the above as raw GPU, or converted CPU, times => Measuring launch overheads Also imports task_host_utilities.cu from cuda_scheduling_examiner as of commit 9fc0ca898ef64b82cbc3734c60405723650bc66f. This is needed for timing logic used in both preemption_logger and mon_cross_ctx_copies, thus the latter would not compile prior to this commit. Also adds a new testbench helper, and a .gitignore for binaries. --- testbench.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'testbench.h') diff --git a/testbench.h b/testbench.h index 28d7f77..5b47bd4 100644 --- a/testbench.h +++ b/testbench.h @@ -11,4 +11,7 @@ #define s2ns(s) ((s)*1000l*1000l*1000l) #define ns2ms(s) ((s)/(1000l*1000l)) + +// Return the difference between two timestamps in nanoseconds #define timediff(start, end) ((s2ns((end).tv_sec) + (end).tv_nsec) - (s2ns((start).tv_sec) + (start).tv_nsec)) +#define time2ns(time) (s2ns((time).tv_sec) + (time).tv_nsec) -- cgit v1.2.2