runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Add initial support for events on CPU & CUDA

Open PearCoding opened this issue 2 years ago • 2 comments

This PR adds event support to AnyDSL runtime. Currently, only CPU & Cuda devices are supported. Support can be queried via device_check_feature_support and "event". Might add HSA support in the future. The new runtime c functions are:

anydsl_event_t anydsl_create_event(int32_t);
void anydsl_destroy_event(int32_t, anydsl_event_t);
void anydsl_record_event(int32_t, anydsl_event_t);
bool anydsl_check_event(int32_t, anydsl_event_t);
uint64_t anydsl_query_us_event(int32_t, anydsl_event_t, anydsl_event_t);
void anydsl_sync_event(int32_t, anydsl_event_t);

Similar interface added to Artic and Impala. Tested on Rodent (Artic).

Note: The 'us' is the official short notation for micro seconds

PearCoding avatar Sep 06 '23 11:09 PearCoding

OpenCL support might be feasible with clGetEventProfilingInfo and other functions

PearCoding avatar Sep 13 '23 09:09 PearCoding

For HSA (AMD) signals can be used. But we have bookkeep some lists to have the same approach as the CUDA events, most likely.

PearCoding avatar Sep 13 '23 15:09 PearCoding