Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasWilkinson committed Oct 9, 2024
1 parent 97647e1 commit a7656d1
Showing 2 changed files with 14 additions and 12 deletions.
24 changes: 13 additions & 11 deletions examples/offline_profile.py
Original file line number Diff line number Diff line change
@@ -138,36 +138,37 @@ def abort_requests():
prefill_results = prefill_prof.results
has_decode = len(decode_results_list) > 0

print("=" * 80)
LINE_WIDTH = 80
print("=" * LINE_WIDTH)
print(f"= Prefill Model Table "
f"(prompt_len={prompt_len}, batch_size={batch_size})")
print("=" * 80)
print("=" * LINE_WIDTH)
print()
prefill_results.print_model_table()

if has_decode:
print()
print("=" * 80)
print("=" * LINE_WIDTH)
print(f"= First Decode Step Model Table "
f"(prompt_len={prompt_len}, batch_size={batch_size})")
print("=" * 80)
print("=" * LINE_WIDTH)
print()
decode_results_list[0].print_model_table()

print()
print("=" * 80)
print("=" * LINE_WIDTH)
print(f"= Prefill Summary Table "
f"(prompt_len={prompt_len}, batch_size={batch_size})")
print("=" * 80)
print("=" * LINE_WIDTH)
print()
prefill_results.print_summary_table()

if has_decode:
print()
print("=" * 80)
print("=" * LINE_WIDTH)
print(f"= First Decode Step Summary Table "
f"(prompt_len={prompt_len}, batch_size={batch_size})")
print("=" * 80)
print("=" * LINE_WIDTH)
print()
decode_results_list[0].print_summary_table()

@@ -321,9 +322,10 @@ def abort_requests():
parser.add_argument(
"--allow-cuda-graphs",
action='store_true',
help="Enables cuda graphs to be used, well remove a lot of the module "
"level info in the profiler results since almost everything runs in "
"the graph where we do not have access to an informative stack trace")
help="Enables cuda graphs to be used. This wo; remove a lot of the "
"module level info in the profiler results since almost everything "
"runs in the graph where we do not have access to an informative stack "
"trace")
parser.add_argument(
"--output-len",
type=int,
2 changes: 1 addition & 1 deletion tools/profiler/print_layerwise_table.py
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ def get_entries(node, curr_depth=0):
pct_cuda_time=12,
trace=60)

# ident entry names based on the depth
# indent entry names based on the depth
entries = []
for entry, depth in entries_and_depths:
entry.name = indent_string(

0 comments on commit a7656d1

Please sign in to comment.