-
Notifications
You must be signed in to change notification settings - Fork 79
rocp_sdk: enable delayed initialization #533
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,9 +147,9 @@ rocp_sdk_init_component(int cid) | |
| return papi_errno; | ||
| } | ||
|
|
||
| // This component needs to be fully initialized from the beginning, | ||
| // because interleaving hip calls and PAPI calls leads to errors. | ||
| return check_n_initialize(); | ||
| sprintf(_rocp_sdk_vector.cmp_info.disabled_reason, "Not initialized. Access component events to initialize it."); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you change |
||
| _rocp_sdk_vector.cmp_info.disabled = PAPI_EDELAY_INIT; | ||
| return PAPI_EDELAY_INIT; | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From my testing, if I have the following workflow: The member variable of To resolve this you need to set |
||
|
|
||
| int | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the added "through PAPI_add_named_event()/PAPI_add_event()" was added due to the
PAPI_EDELAY_INITsupport and doing this workflow would initialize the component.However, you can also call
PAPI_enum_cmp_event(int *EventCode, PAPI_ENUM_FIRST, int cidx)to initialize the component. I would make that aware to users as well.