From 8c0b43156ef3092938333830faff4cac9d79873c Mon Sep 17 00:00:00 2001 From: Evgeny Date: Tue, 8 Oct 2019 19:09:43 -0500 Subject: [PATCH] tracing layer unifying with hcc: removing API_ID_ANY [ROCm/hip commit: 4e93833035a452ce81bd1828e2f01da95bf93f9b] --- projects/hip/hip_prof_gen.py | 1 - projects/hip/src/hip_prof_api.h | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/projects/hip/hip_prof_gen.py b/projects/hip/hip_prof_gen.py index 6a1564cbb9..d1203a64d6 100755 --- a/projects/hip/hip_prof_gen.py +++ b/projects/hip/hip_prof_gen.py @@ -329,7 +329,6 @@ def generate_prof_header(f, api_map, opts_map): f.write(' HIP_API_ID_' + name + ' = ' + str(cb_id) + ',\n') cb_id += 1 f.write(' HIP_API_ID_NUMBER = ' + str(cb_id) + ',\n') - f.write(' HIP_API_ID_ANY = ' + str(cb_id + 1) + ',\n') f.write('\n') f.write(' HIP_API_ID_NONE = HIP_API_ID_NUMBER,\n') for name in priv_lst: diff --git a/projects/hip/src/hip_prof_api.h b/projects/hip/src/hip_prof_api.h index eb3112bdb4..8a69746f93 100644 --- a/projects/hip/src/hip_prof_api.h +++ b/projects/hip/src/hip_prof_api.h @@ -38,9 +38,7 @@ class api_callbacks_table_templ { bool set_activity(uint32_t id, act_t fun, void* arg) { std::lock_guard lock(mutex_); bool ret = true; - if (id == HIP_API_ID_ANY) { - for (unsigned i = 0; i < HIP_API_ID_NUMBER; ++i) set_activity(i, fun, arg); - } else if (id < HIP_API_ID_NUMBER) { + if (id < HIP_API_ID_NUMBER) { cb_sync(id); callbacks_table_.arr[id].act = fun; callbacks_table_.arr[id].a_arg = arg; @@ -54,9 +52,7 @@ class api_callbacks_table_templ { bool set_callback(uint32_t id, fun_t fun, void* arg) { std::lock_guard lock(mutex_); bool ret = true; - if (id == HIP_API_ID_ANY) { - for (unsigned i = 0; i < HIP_API_ID_NUMBER; ++i) set_callback(i, fun, arg); - } else if (id < HIP_API_ID_NUMBER) { + if (id < HIP_API_ID_NUMBER) { cb_sync(id); callbacks_table_.arr[id].fun = fun; callbacks_table_.arr[id].arg = arg;