Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial support for events on CPU & CUDA #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PearCoding
Copy link
Contributor

@PearCoding PearCoding commented Sep 6, 2023

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 PearCoding changed the title Add initial support for events on CPU & Cuda Add initial support for events on CPU & CUDA Sep 6, 2023
@PearCoding
Copy link
Contributor Author

OpenCL support might be feasible with clGetEventProfilingInfo and other functions

@PearCoding
Copy link
Contributor Author

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 free to 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