Download nemotron-ocr/cpp/trove/tests/timer.h from Metausermac13/nemotron-ocr-v2: direct link, hf CLI and curl.
- Browser
- Download file 453 Bytes
-
https://huggingface.co/Metausermac13/nemotron-ocr-v2/resolve/main/nemotron-ocr/cpp/trove/tests/timer.h
- Command line
-
hf download hf://Metausermac13/nemotron-ocr-v2/nemotron-ocr/cpp/trove/tests/timer.h
-
curl -L -o timer.h https://huggingface.co/Metausermac13/nemotron-ocr-v2/resolve/main/nemotron-ocr/cpp/trove/tests/timer.h
453 Bytes
| struct cuda_timer { | |
| cudaEvent_t start_event; | |
| cudaEvent_t stop_event; | |
| void start() { | |
| cudaEventCreate(&start_event); | |
| cudaEventCreate(&stop_event); | |
| cudaEventRecord(start_event, 0); | |
| } | |
| float stop() { | |
| cudaEventRecord(stop_event, 0); | |
| cudaEventSynchronize(stop_event); | |
| float time = 0; | |
| cudaEventElapsedTime(&time, start_event, stop_event); | |
| return time; | |
| } | |
| }; | |