Skip to content

Commit 1e75758

Browse files
tkonoligeTristan Konolige
authored andcommitted
[TVMC] Switch profile flag to use new profiler
1 parent 8843153 commit 1e75758

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

python/tvm/driver/tvmc/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def import_package(self, package_path: str):
371371
class TVMCResult(object):
372372
"""A class that stores the results of tvmc.run and provides helper utilities."""
373373

374-
def __init__(self, outputs: Dict[str, np.ndarray], times: List[str]):
374+
def __init__(self, outputs: Dict[str, np.ndarray], times: List[float]):
375375
"""Create a convenience wrapper around the output of tvmc.run
376376
377377
Parameters

python/tvm/driver/tvmc/runner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,9 @@ def run_module(
417417
# Run must be called explicitly if profiling
418418
if profile:
419419
logger.info("Running the module with profiling enabled.")
420-
module.run()
420+
report = module.profile()
421+
# This print is intentional
422+
print(report)
421423

422424
# create the module time evaluator (returns a function)
423425
timer = module.module.time_evaluator("run", dev, number=number, repeat=repeat)

0 commit comments

Comments
 (0)