Skip to content

Commit 69129e5

Browse files
authored
Fix clock overflow issue reported by Alex Wells. Remove unnecessary condition 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
1 parent 67e5290 commit 69129e5

File tree

2 files changed

+164
-162
lines changed

2 files changed

+164
-162
lines changed

tools/unitrace/scripts/gen_tracing_callbacks.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -360,15 +360,15 @@ def gen_enter_callback(f, func, command_list_func_list, command_queue_func_list,
360360
if (cb != ""):
361361
f.write(" if (collector->options_.kernel_tracing) { \n")
362362
if (func in synchronize_func_list):
363-
f.write(" " + cb + "(params, result, global_user_data, instance_user_data, &kids); \n")
363+
f.write(" " + cb + "(params, global_user_data, instance_user_data, &kids); \n")
364364
f.write(" if (kids.size() != 0) {\n")
365365
f.write(" ze_instance_data.kid = kids[0];\n") # pass kid to the exit callback
366366
f.write(" }\n")
367367
f.write(" else {\n")
368368
f.write(" ze_instance_data.kid = (uint64_t)(-1);\n")
369369
f.write(" }\n")
370370
else:
371-
f.write(" " + cb + "(params, result, global_user_data, instance_user_data); \n")
371+
f.write(" " + cb + "(params, global_user_data, instance_user_data); \n")
372372
f.write(" }\n")
373373
f.write("\n")
374374
f.write(" PTI_ASSERT(collector->correlator_ != nullptr);\n")

0 commit comments

Comments
 (0)