Skip to main content

XProf Profiler Plugin

Project description

XProf (+ Tensorboard Profiler Plugin)

XProf includes a suite of tools for JAX, TensorFlow, and PyTorch/XLA. These tools help you understand, debug and optimize programs to run on CPUs, GPUs and TPUs.

XProf offers a number of tools to analyse and visualize the performance of your model across multiple devices. Some of the tools include:

  • Overview: A high-level overview of the performance of your model. This is an aggregated overview for your host and all devices. It includes:
    • Performance summary and breakdown of step times.
    • A graph of individual step times.
    • A table of the top 10 most expensive operations.
  • Trace Viewer: Displays a timeline of the execution of your model that shows:
    • The duration of each op.
    • Which part of the system (host or device) executed an op.
    • The communication between devices.
  • Memory Profile Viewer: Monitors the memory usage of your model.
  • Graph Viewer: A visualization of the graph structure of HLOs of your model.

Demo

First time user? Come and check out this Colab Demo.

Prerequisites

  • tensorboard-plugin-profile >= 2.19.0
  • (optional) TensorBoard >= 2.19.0

Note: XProf requires access to the Internet to load the Google Chart library. Some charts and tables may be missing if you run TensorBoard entirely offline on your local machine, behind a corporate firewall, or in a datacenter.

To profile on a single GPU system, the following NVIDIA software must be installed on your system:

  1. NVIDIA GPU drivers and CUDA Toolkit:

    • CUDA 12.5 requires 525.60.13 and higher.
  2. Ensure that CUPTI 10.1 exists on the path.

    $ /sbin/ldconfig -N -v $(sed 's/:/ /g' <<< $LD_LIBRARY_PATH) | grep libcupti
    

    If you don't see libcupti.so.12.5 on the path, prepend its installation directory to the $LD_LIBRARY_PATH environmental variable:

    $ export LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
    

    Run the ldconfig command above again to verify that the CUPTI 12.5 library is found.

    If this doesn't work, try:

    $ sudo apt-get install libcupti-dev
    

To profile a system with multiple GPUs, see this guide for details.

To profile multi-worker GPU configurations, profile individual workers independently.

To profile cloud TPUs, you must have access to Google Cloud TPUs.

Quick Start

In order to get the latest version of the profiler plugin, you can install the nightly package.

To install the nightly version of profiler:

$ pip uninstall xprof
$ pip install xprof-nightly

Without TensorBoard:

$ xprof --logdir=profiler/demo --port=6006

With TensorBoard:

$ tensorboard --logdir=profiler/demo

If you are behind a corporate firewall, you may need to include the --bind_all tensorboard flag.

Go to localhost:6006/#profile of your browser, you should now see the demo overview page show up. Congratulations! You're now ready to capture a profile.

Next Steps

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

xprof-2.20.1-cp312-none-manylinux2014_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.12

xprof-2.20.1-cp312-none-macosx_12_0_arm64.whl (10.7 MB view details)

Uploaded CPython 3.12macOS 12.0+ ARM64

xprof-2.20.1-cp311-none-manylinux2014_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.11

xprof-2.20.1-cp311-none-macosx_12_0_arm64.whl (10.7 MB view details)

Uploaded CPython 3.11macOS 12.0+ ARM64

xprof-2.20.1-cp310-none-manylinux2014_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.10

xprof-2.20.1-cp310-none-macosx_12_0_arm64.whl (10.7 MB view details)

Uploaded CPython 3.10macOS 12.0+ ARM64

xprof-2.20.1-cp39-none-manylinux2014_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.9

xprof-2.20.1-cp39-none-macosx_12_0_arm64.whl (10.7 MB view details)

Uploaded CPython 3.9macOS 12.0+ ARM64

File details

Details for the file xprof-2.20.1-cp312-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for xprof-2.20.1-cp312-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ab5cdaa9b7368c9d887575f00a3cf5e5da82838689a250a8789db78773c92f8b
MD5 a35cb10b14f385c917db8ec8d12f6e32
BLAKE2b-256 50800311f22343e138e2b8d97aa7dc48c2517bc2d5b0741492fb5a807228d8a5

See more details on using hashes here.

File details

Details for the file xprof-2.20.1-cp312-none-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for xprof-2.20.1-cp312-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 53cc446b6a027d27a363472345904ee0cdfd59cefbd28b51cd3ced6de490c0aa
MD5 0d826ee5269831c321b4f1856763912f
BLAKE2b-256 97176ccf66a83ce146ea509334421dcbd5eff48ea59c14ad81fe689e9c681daa

See more details on using hashes here.

File details

Details for the file xprof-2.20.1-cp311-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for xprof-2.20.1-cp311-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44593f9dfc319d3a6905ceeb15c77d7c132e14e5794f57e9f38642ff5ea78e99
MD5 99994c76e9d43e66e07b5730118e0284
BLAKE2b-256 feb815a99a01fa99321a480c379a3e4627910d3f950587dfc911eed6b2e6c520

See more details on using hashes here.

File details

Details for the file xprof-2.20.1-cp311-none-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for xprof-2.20.1-cp311-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 9d2d27e9df421b25c7699483383c175069064b6ca08cf25cfed318a3df0f3bd5
MD5 9bca947c880f1b1a393d2752c89276de
BLAKE2b-256 bffcbaf778ec127d98dd8302687dc5dd1882329bc5474016f5aa592c0b041dea

See more details on using hashes here.

File details

Details for the file xprof-2.20.1-cp310-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for xprof-2.20.1-cp310-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ac19b253424793fc8936fdffeaaec352a5c5cc5439fb2c3e859fef9478b1a61d
MD5 c02b1214c01ff32ed658afb27dc63b10
BLAKE2b-256 5fde61ac7366b7fda4d2cd1a4f69fdd85b7be798d8a666c929d8fa857a9e8d40

See more details on using hashes here.

File details

Details for the file xprof-2.20.1-cp310-none-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for xprof-2.20.1-cp310-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 c5a2a04fbb9dd6cfdc1c7851731350c204fd76d7da034a4eb7e4aa1b633ec068
MD5 963c9d1b9e2fae1e4a893df24c525d45
BLAKE2b-256 b35afce87d2a9db950330280341b3f0f8e1f9093c95fef129e0a17fe2e13c86f

See more details on using hashes here.

File details

Details for the file xprof-2.20.1-cp39-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for xprof-2.20.1-cp39-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fa6f53e94380448a1528ad9a58564044b5ef8863cd2a7031ea21b1aca7b16996
MD5 176365cef589874b433e58531ec83a9c
BLAKE2b-256 c1ac07bcbfd0a3e73e2f22c683fcd9789d085058ba775b1c9f22ce0b26e43949

See more details on using hashes here.

File details

Details for the file xprof-2.20.1-cp39-none-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for xprof-2.20.1-cp39-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 efd846cef57a65bc26af687a1ef095d3b28a7306b25e1e3625cd908c8f59bed3
MD5 94f5dcc0fa36de9bf2873c95951db720
BLAKE2b-256 2e39fc9472278f840a55d812fffe38c2187009c09a4b216d558ae9520079d1cb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page