Skip to content

Commit

Permalink
Fix clock overflow issue reported by Alex Wells. Remove unnecessary c…
Browse files Browse the repository at this point in the history
…ondition checks and unused variables (#56)

* Added "Profile PyTorch" section in README.md

* Fix clock overflow issue reported by Alex Wells. Remove unnecessary condition checks and unused variables

* Remove unused argument 'result' in OnEnter*() calls

* Remove dead code
  • Loading branch information
zma2 authored Jan 30, 2024
1 parent 67e5290 commit 69129e5
Show file tree
Hide file tree
Showing 2 changed files with 164 additions and 162 deletions.
4 changes: 2 additions & 2 deletions tools/unitrace/scripts/gen_tracing_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,15 +360,15 @@ def gen_enter_callback(f, func, command_list_func_list, command_queue_func_list,
if (cb != ""):
f.write(" if (collector->options_.kernel_tracing) { \n")
if (func in synchronize_func_list):
f.write(" " + cb + "(params, result, global_user_data, instance_user_data, &kids); \n")
f.write(" " + cb + "(params, global_user_data, instance_user_data, &kids); \n")
f.write(" if (kids.size() != 0) {\n")
f.write(" ze_instance_data.kid = kids[0];\n") # pass kid to the exit callback
f.write(" }\n")
f.write(" else {\n")
f.write(" ze_instance_data.kid = (uint64_t)(-1);\n")
f.write(" }\n")
else:
f.write(" " + cb + "(params, result, global_user_data, instance_user_data); \n")
f.write(" " + cb + "(params, global_user_data, instance_user_data); \n")
f.write(" }\n")
f.write("\n")
f.write(" PTI_ASSERT(collector->correlator_ != nullptr);\n")
Expand Down
Loading

0 comments on commit 69129e5

Please sign in to comment.