Skip to content

[Graph Debugger] Expose way to benchmark individual nodes.#11000

Merged
masahi merged 15 commits into
apache:mainfrom
AndrewZhaoLuo:aluo/run-individual-node
Apr 28, 2022
Merged

[Graph Debugger] Expose way to benchmark individual nodes.#11000
masahi merged 15 commits into
apache:mainfrom
AndrewZhaoLuo:aluo/run-individual-node

Conversation

@AndrewZhaoLuo

@AndrewZhaoLuo AndrewZhaoLuo commented Apr 13, 2022

Copy link
Copy Markdown
Contributor

This is useful if we only care about a single node or set of nodes in our graph we want to benchmark.

Associated example script of use: https://github.com/AndrewZhaoLuo/TVM-Sandbox/blob/main/runtime/test_benchmark_funcs_graph_runtime.py

@AndrewZhaoLuo

Copy link
Copy Markdown
Contributor Author

cc @tkonolige

@tkonolige tkonolige left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice utility to have, thanks @AndrewZhaoLuo! Maybe we could add this to the VM too (although it doesn't have a concept of "node").

Comment thread python/tvm/contrib/debugger/debug_executor.py
Comment thread python/tvm/contrib/debugger/debug_executor.py Outdated
Comment thread python/tvm/contrib/debugger/debug_executor.py Outdated
Comment thread python/tvm/contrib/debugger/debug_executor.py Outdated
Comment thread src/runtime/graph_executor/debug/graph_executor_debug.cc
Comment thread src/runtime/graph_executor/debug/graph_executor_debug.cc Outdated
Comment thread src/runtime/graph_executor/debug/graph_executor_debug.cc Outdated
Comment thread src/runtime/graph_executor/debug/graph_executor_debug.cc Outdated
Comment thread src/runtime/graph_executor/debug/graph_executor_debug.cc Outdated

@AndrewZhaoLuo AndrewZhaoLuo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review! Have some questions about using time_evaluator though.

Comment thread src/runtime/graph_executor/debug/graph_executor_debug.cc Outdated
Comment thread src/runtime/graph_executor/debug/graph_executor_debug.cc Outdated
Comment thread src/runtime/graph_executor/debug/graph_executor_debug.cc Outdated
Comment thread src/runtime/graph_executor/debug/graph_executor_debug.cc
Comment thread src/runtime/graph_executor/debug/graph_executor_debug.cc Outdated
Comment thread python/tvm/contrib/debugger/debug_executor.py Outdated
Comment thread python/tvm/contrib/debugger/debug_executor.py
Comment thread python/tvm/contrib/debugger/debug_executor.py Outdated
Comment thread python/tvm/contrib/debugger/debug_executor.py Outdated
Comment thread src/runtime/graph_executor/debug/graph_executor_debug.cc Outdated
@AndrewZhaoLuo

Copy link
Copy Markdown
Contributor Author

PTAL @tkonolige

@tkonolige tkonolige left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code look good, but could you add a test case?

@AndrewZhaoLuo

Copy link
Copy Markdown
Contributor Author

The code look good, but could you add a test case?

Done

Comment thread tests/python/unittest/test_runtime_graph_debug.py Outdated
Comment thread tests/python/unittest/test_runtime_graph_debug.py Outdated
Comment thread tests/python/unittest/test_runtime_graph_debug.py Outdated
Comment thread tests/python/unittest/test_runtime_graph_debug.py Outdated

@tkonolige tkonolige left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Not sure what is going on with CI.

@AndrewZhaoLuo AndrewZhaoLuo force-pushed the aluo/run-individual-node branch from 096f026 to 7122525 Compare April 27, 2022 04:25
@AndrewZhaoLuo AndrewZhaoLuo force-pushed the aluo/run-individual-node branch from 7122525 to e864722 Compare April 27, 2022 17:46
@masahi masahi merged commit 9fd279b into apache:main Apr 28, 2022
shtinsa pushed a commit to Deelvin/tvm that referenced this pull request May 17, 2022
)

* initial

* secondary commit

* docs

* match tests

* fix test

* use std::fixed, max precision, typed pack func, fix isnan

* comments on docs

* address tristan comments

* add test

* tristan comments

* use skipif

* empty commit

* empty commit

* jostle again

* remove assert statement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants