SWDEV-351980 - Use the new hipRegister/RemoveAsyncActivityCallback

Remove the hipInitActivityCallback and use the new hipRegister/
RemoveActivityCallback which allows distinct memory pools to be used
for HIP_OPS activities.

Enable the multi_pool_activities test.

Change-Id: I6f6feaedecc9c36285bea975caf24dbf8f5f624b
This commit is contained in:
Laurent Morichetti
2022-08-30 18:47:00 -07:00
parent f0e082feb1
commit 340c7cb553
8 changed files with 70 additions and 35 deletions
+3 -2
View File
@@ -67,7 +67,7 @@ int main() {
roctracer_properties_t properties{};
properties.buffer_callback_fun = buffer_callback;
properties.buffer_callback_arg = nullptr;
properties.buffer_size = 1024;
properties.buffer_size = 1024 * 1024;
roctracer_pool_t* pool_1;
CHECK(roctracer_open_pool_expl(&properties, &pool_1));
@@ -76,6 +76,7 @@ int main() {
roctracer_pool_t* pool_2;
CHECK(roctracer_open_pool_expl(&properties, &pool_2));
CHECK(roctracer_enable_op_activity_expl(ACTIVITY_DOMAIN_HIP_OPS, HIP_OP_ID_COPY, pool_2));
CHECK(roctracer_enable_op_activity_expl(ACTIVITY_DOMAIN_HIP_API, HIP_API_ID_hipMemcpy, pool_2));
int host_array[256] = {0};
int* device_memory;
@@ -90,4 +91,4 @@ int main() {
CHECK(roctracer_flush_activity_expl(pool_1));
CHECK(roctracer_flush_activity_expl(pool_2));
return 0;
}
}