diff options
| author | Joshua Bakita <bakitajoshua@gmail.com> | 2024-02-19 20:39:39 -0500 |
|---|---|---|
| committer | Joshua Bakita <bakitajoshua@gmail.com> | 2024-02-19 20:39:39 -0500 |
| commit | cd9ee070e2fcaa49fe35944ea0fd60ed5d197ba2 (patch) | |
| tree | cb31473e1793e383a06dd0b560c7ab83374040ff /preemption_logger.cu | |
| parent | 18641058a2d60e172f18176b41d51baa706ffd85 (diff) | |
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`.
Diffstat (limited to 'preemption_logger.cu')
| -rw-r--r-- | preemption_logger.cu | 3 |
1 files changed, 1 insertions, 2 deletions
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 { | |||
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| 29 | // Minimum time discontinuity which indicates a gap between intervals | 29 | // Minimum time discontinuity which indicates a gap between intervals |
| 30 | // One clock tick is about 1ns | 30 | // Clock resolution is about 1ns, but it only ticks every 1us pre-H100 |
| 31 | #define MIN_PREEMPT_TICKS 2*1000 // ~2us | 31 | #define MIN_PREEMPT_TICKS 2*1000 // ~2us |
| 32 | 32 | ||
| 33 | // Watch for discontinuities in the GPU clock, indicating intervals during | 33 | // 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\ | |||
| 67 | -r, --raw Print raw logged GPU times (skip conversion to CPU time).\n"; | 67 | -r, --raw Print raw logged GPU times (skip conversion to CPU time).\n"; |
| 68 | 68 | ||
| 69 | int main(int argc, char **argv) { | 69 | int main(int argc, char **argv) { |
| 70 | cudaError_t err; // Needed for the SAFE() macro | ||
| 71 | struct interval *ivls_gpu, *ivls; | 70 | struct interval *ivls_gpu, *ivls; |
| 72 | struct timespec start, end, end_ivls_only; | 71 | struct timespec start, end, end_ivls_only; |
| 73 | int num_ivls, skip_conversion; | 72 | int num_ivls, skip_conversion; |
