XLA performance

215 views
Skip to first unread message

mvinay0...@gmail.com

unread,
Sep 24, 2020, 1:51:29 AM9/24/20
to XLA development
Hi,

How to evaluate the performance of the LLVM / MLIR / HLO code generated ? Is there any reference for the same?

I tried with Profiler / Tensorboard. But it just provides the time taken for each XLA cluster (LLVM Function) in trace viewer. I found that "--xla_hlo_profile" logs the cycles per HLO operation and also generates "hlo_execution_profile_data" data file. How to read the same? Can tensorboard or any other tool be used to visualize the data generated in structured format?

Thanks,
Vinay

Adrian Kuegel

unread,
Sep 24, 2020, 4:40:23 AM9/24/20
to mvinay0...@gmail.com, XLA development
Unfortunately there is no open-source visualization for the profile data generated with --xla_hlo_profile. The data file is used by an internal HLO diffing tool, it adds the profiling data to the diff that is visualized. Unfortunately this tool is not available in open source.

--
You received this message because you are subscribed to the Google Groups "XLA development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xla-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xla-dev/b88cc6c4-6bf2-4806-b5ac-225fd7083b6dn%40googlegroups.com.


--


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender und löschen Sie die E-Mail und alle Anhänge. Vielen Dank.

      

This e-mail is confidential. If you are not the right addressee please do not forward it, please inform the sender, and please erase this e-mail including any attachments. Thanks.

Thomas Joerg

unread,
Sep 24, 2020, 6:28:58 AM9/24/20
to Adrian Kuegel, mvinay0...@gmail.com, XLA development
Hi,

On Thu, Sep 24, 2020 at 10:40 AM 'Adrian Kuegel' via XLA development <xla...@googlegroups.com> wrote:
Unfortunately there is no open-source visualization for the profile data generated with --xla_hlo_profile. The data file is used by an internal HLO diffing tool, it adds the profiling data to the diff that is visualized. Unfortunately this tool is not available in open source.

On Thu, Sep 24, 2020 at 7:51 AM mvinay0...@gmail.com <mvinay0...@gmail.com> wrote:
Hi,

How to evaluate the performance of the LLVM / MLIR / HLO code generated ? Is there any reference for the same?

I tried with Profiler / Tensorboard. But it just provides the time taken for each XLA cluster (LLVM Function) in trace viewer. I found that "--xla_hlo_profile" logs the cycles per HLO operation

The profile data written to logs is (meant to be) human readable. As you said, the tabular format includes cycles per HLO op, but you'll also find the walltime, optimal time (assuming peak memory bandwidth), achieved FLOP/s, achieved memory bandwidth, and Bytes/cycle for each HLO op. At Google we heavily rely on this tool for performance analysis.

Execution profile for <hlo_module>: (<total time>)
        <total cycles> (100.% 100Σ) ::       <total time> (<optimal time>) ::       xx.xxGFLOP/s ::                    ::     xx.xxGiB/s ::        xxB/cycle :: [total] [entry]
        <op cycles>    (xx.xx% xxΣ) ::       <op time>    (<optimal time>) ::       xx.xxGFLOP/s ::                    ::     xx.xxGiB/s ::        xxB/cycle :: <hlo_instruction>
        <op cycles>    (xx.xx% xxΣ) ::       <op time>    (<optimal time>) ::       xx.xxGFLOP/s ::                    ::     xx.xxGiB/s ::        xxB/cycle :: <hlo_instruction>


and also generates "hlo_execution_profile_data" data file.

As Adrian said, there's no open-source tool consuming this file at this point.


Hope this helps,

Thomas

 
How to read the same? Can tensorboard or any other tool be used to visualize the data generated in structured format?

Thanks,
Vinay

--
You received this message because you are subscribed to the Google Groups "XLA development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xla-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xla-dev/b88cc6c4-6bf2-4806-b5ac-225fd7083b6dn%40googlegroups.com.


--


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender und löschen Sie die E-Mail und alle Anhänge. Vielen Dank.

      

This e-mail is confidential. If you are not the right addressee please do not forward it, please inform the sender, and please erase this e-mail including any attachments. Thanks.

--
You received this message because you are subscribed to the Google Groups "XLA development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xla-dev+u...@googlegroups.com.
Google Germany GmbH
Erika-Mann-Straße 33
80636 München
Reply all
Reply to author
Forward
0 new messages