Skip to content

Add initial support for events on CPU & CUDA - #44

Open
PearCoding wants to merge 1 commit into
AnyDSL:masterfrom
PearCoding:feature/events
Open

Add initial support for events on CPU & CUDA#44
PearCoding wants to merge 1 commit into
AnyDSL:masterfrom
PearCoding:feature/events

Conversation

@PearCoding

@PearCodingPearCoding commented Sep 6, 2023

Copy link
Copy Markdown
Contributor

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

@PearCodingPearCoding changed the title Add initial support for events on CPU & CudaAdd initial support for events on CPU & CUDASep 6, 2023
@PearCoding

Copy link
Copy Markdown
ContributorAuthor

OpenCL support might be feasible with clGetEventProfilingInfo and other functions

@PearCoding

Copy link
Copy Markdown
ContributorAuthor

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@PearCoding