Download workloads/common/cupti_add.h from lrh12580/UvmPinAsync: direct link, hf CLI and curl.
- Browser
- Download file 2.16 kB
-
https://huggingface.co/lrh12580/UvmPinAsync/resolve/main/workloads/common/cupti_add.h
- Command line
-
hf download hf://lrh12580/UvmPinAsync/workloads/common/cupti_add.h
-
curl -L -o cupti_add.h https://huggingface.co/lrh12580/UvmPinAsync/resolve/main/workloads/common/cupti_add.h
2.16 kB
| static uint64_t startTimestamp; | |
| // Timestamp at trace initialization time. Used to normalized other | |
| // timestamps | |
| extern inline __attribute__((always_inline)) unsigned long rdtsc() { | |
| unsigned long a, d; | |
| __asm__ volatile("rdtsc" : "=a"(a), "=d"(d)); | |
| return (a | (d << 32)); | |
| } | |
| extern inline __attribute__((always_inline)) unsigned long rdtsp() { | |
| struct timespec tms; | |
| if (clock_gettime(CLOCK_REALTIME, &tms)) { | |
| return -1; | |
| } | |
| unsigned long ns = tms.tv_sec * 1000000000; | |
| ns += tms.tv_nsec; | |
| return ns; | |
| } | |
| void initTrace(); | |
| void finiTrace(); | |
| void GPU_argv_init(); | |
| void CUPTIAPI bufferRequested(uint8_t **buffer, size_t *size, size_t *maxNumRecords); | |
| void CUPTIAPI bufferCompleted(CUcontext ctx, uint32_t streamId, uint8_t *buffer, size_t size, size_t validSize); | |
| static void printActivity(CUpti_Activity *record); | |