Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Infra] Support Timelines as a multithreading profiler #2164

Merged
merged 14 commits into from
Jan 19, 2021

Conversation

yuanming-hu
Copy link
Member

Related issue = #742

The generated timeline json can be view via Chrome: https://slack.engineering/chrome-tracing-for-fun-and-profit/#:~:text=Chrome%20Tracing%20lets%20you%20record,is%20waiting%20on%20another%20process.

  • C++-side API: TI_TIMELINE and TI_AUTO_TIMELINE
  • Python-side API: ti.init(timeline=True), ti.timeline_clear() and ti.timeline_save(fn)

There are other tools that do similar things, but they tend to expose too much information.

Demo:
Screenshot from 2021-01-19 00-52-57

  • Parallel compilation:
    Screenshot from 2021-01-19 00-52-23

  • Flamechart of flush:
    Screenshot from 2021-01-19 00-53-45

  • CPU blocking GPU:
    Screenshot from 2021-01-19 01-00-18

[Click here for the format server]


@yuanming-hu yuanming-hu requested a review from k-ye January 19, 2021 06:04
Copy link
Member

@k-ye k-ye left a comment

Choose a reason for hiding this comment

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

Looks great!

taichi/system/timeline.h Show resolved Hide resolved
taichi/system/timeline.h Show resolved Hide resolved
taichi/system/timeline.h Outdated Show resolved Hide resolved
@yuanming-hu yuanming-hu merged commit ca69ff5 into taichi-dev:master Jan 19, 2021
@yuanming-hu yuanming-hu deleted the timeline branch January 19, 2021 16:05
@k-ye k-ye mentioned this pull request Feb 4, 2021
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.

2 participants