diff options
| -rw-r--r-- | copy_experiments/mon_cross_ctx_copies.cu | 4 | ||||
| -rw-r--r-- | preemption_logger.cu | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/copy_experiments/mon_cross_ctx_copies.cu b/copy_experiments/mon_cross_ctx_copies.cu index 2912aec..e836179 100644 --- a/copy_experiments/mon_cross_ctx_copies.cu +++ b/copy_experiments/mon_cross_ctx_copies.cu | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright 2022 Joshua Bakita | 1 | /* Copyright 2024 Joshua Bakita |
| 2 | * Starts two copies of configurable size in seperate contexts at the same time | 2 | * Starts two copies of configurable size in seperate contexts at the same time |
| 3 | * (by default) and logs the times that pages are copied to the GPU. Supports | 3 | * (by default) and logs the times that pages are copied to the GPU. Supports |
| 4 | * monitoring copy progress from either the GPU or the CPU. All output times are | 4 | * monitoring copy progress from either the GPU or the CPU. All output times are |
| @@ -12,7 +12,7 @@ WARNING: By default, assumes that GPU and CPU clocks tick at the same rate. | |||
| 12 | * | 12 | * |
| 13 | */ | 13 | */ |
| 14 | #include "copy_testbench.h" | 14 | #include "copy_testbench.h" |
| 15 | #include "../task_host_utilities.cu" // Just for GetHostDeviceTimeOffset() | 15 | #include "../task_host_utilities.cu" |
| 16 | #include <stdio.h> | 16 | #include <stdio.h> |
| 17 | #include <stdlib.h> | 17 | #include <stdlib.h> |
| 18 | #include <stdint.h> | 18 | #include <stdint.h> |
diff --git a/preemption_logger.cu b/preemption_logger.cu index d93600e..89b348a 100644 --- a/preemption_logger.cu +++ b/preemption_logger.cu | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright 2023 Joshua Bakita | 1 | /* Copyright 2024 Joshua Bakita |
| 2 | * Tool that tracks preemptions as discontinuities in GPU time and logs them. | 2 | * Tool that tracks preemptions as discontinuities in GPU time and logs them. |
| 3 | * | 3 | * |
| 4 | * The logged intervals are output to standard out as a CSV, with each row | 4 | * The logged intervals are output to standard out as a CSV, with each row |
| @@ -92,8 +92,11 @@ int main(int argc, char **argv) { | |||
| 92 | if (!skip_conversion) { | 92 | if (!skip_conversion) { |
| 93 | // Note that this appears to almost always be 1.0 on recent GPUs | 93 | // Note that this appears to almost always be 1.0 on recent GPUs |
| 94 | d2h_scale = GetGPUTimerScale(0); | 94 | d2h_scale = GetGPUTimerScale(0); |
| 95 | // The following uses a subprocess for clock synchronization. Sketch? | 95 | InternalReadGPUNanoseconds(0, &host_s, &dev_ns); |
| 96 | GetHostDeviceTimeOffset(0, &host_s, &dev_ns); | 96 | if (host_s == 0 && !dev_ns) { |
| 97 | fprintf(stderr, "Unable to synchronize time with the GPU. Aborting...\n"); | ||
| 98 | return 1; | ||
| 99 | } | ||
| 97 | } | 100 | } |
| 98 | 101 | ||
| 99 | // Initialize GPU and CPU memory to store the intervals of execution | 102 | // Initialize GPU and CPU memory to store the intervals of execution |
