diff --git a/src/components/rocp_sdk/README.md b/src/components/rocp_sdk/README.md index cd56002f7..960b67e88 100644 --- a/src/components/rocp_sdk/README.md +++ b/src/components/rocp_sdk/README.md @@ -62,4 +62,4 @@ Example: ## Known Limitations * In dispatch mode, PAPI may read zeros if reading takes place immediately after the return of a GPU kernel. This is not a PAPI bug. It may occur because calls such as hipDeviceSynchronize() do not guarantee that ROCprofiler has been called and all counter buffers have been flushed. Therefore, it is recommended that the user code adds a delay between the return of a kernel and calls to PAPI_read(), PAPI_stop(), etc. -* If an application is linked against the static PAPI library libpapi.a, then the application must call PAPI_library_init() before calling any hip routines (e.g. hipInit(), hipGetDeviceCount(), hipLaunchKernelGGL(), etc). If the application is linked against the dynamic library libpapi.so, then the order of operations does not matter. +* If an application is linked against the static PAPI library libpapi.a, then the application must call PAPI_library_init() through PAPI_add_named_event()/PAPI_add_event() before calling any hip routines (e.g. hipInit(), hipGetDeviceCount(), hipLaunchKernelGGL(), etc). If the application is linked against the dynamic library libpapi.so, then the order of operations does not matter. diff --git a/src/components/rocp_sdk/rocp_sdk.c b/src/components/rocp_sdk/rocp_sdk.c index 106a3cacc..fc3c3a628 100644 --- a/src/components/rocp_sdk/rocp_sdk.c +++ b/src/components/rocp_sdk/rocp_sdk.c @@ -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."); + _rocp_sdk_vector.cmp_info.disabled = PAPI_EDELAY_INIT; + return PAPI_EDELAY_INIT; } int