tbp-nightly 2.22.4a20260122__cp310-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,292 @@
1
+ Metadata-Version: 2.4
2
+ Name: tbp-nightly
3
+ Version: 2.22.4a20260122
4
+ Summary: XProf Profiler Plugin
5
+ Home-page: https://github.com/openxla/xprof-nightly
6
+ Author: Google Inc.
7
+ Author-email: packages@tensorflow.org
8
+ License: Apache 2.0
9
+ Keywords: jax pytorch xla tensorflow tensorboard xprof-nightly profile plugin
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Intended Audience :: Education
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Classifier: Topic :: Software Development :: Libraries
18
+ Requires-Python: >= 2.7, != 3.0.*, != 3.1.*
19
+ Description-Content-Type: text/markdown
20
+ Requires-Dist: xprof-nightly==2.22.4a20260122
21
+ Dynamic: author
22
+ Dynamic: author-email
23
+ Dynamic: classifier
24
+ Dynamic: description
25
+ Dynamic: description-content-type
26
+ Dynamic: home-page
27
+ Dynamic: keywords
28
+ Dynamic: license
29
+ Dynamic: requires-dist
30
+ Dynamic: requires-python
31
+ Dynamic: summary
32
+
33
+ # XProf (+ Tensorboard Profiler Plugin)
34
+
35
+ XProf offers a number of tools to analyse and visualize the
36
+ performance of your model across multiple devices. Some of the tools include:
37
+
38
+ * **Overview**: A high-level overview of the performance of your model. This
39
+ is an aggregated overview for your host and all devices. It includes:
40
+ * Performance summary and breakdown of step times.
41
+ * A graph of individual step times.
42
+ * High level details of the run environment.
43
+ * **Trace Viewer**: Displays a timeline of the execution of your model that shows:
44
+ * The duration of each op.
45
+ * Which part of the system (host or device) executed an op.
46
+ * The communication between devices.
47
+ * **Memory Profile Viewer**: Monitors the memory usage of your model.
48
+ * **Graph Viewer**: A visualization of the graph structure of HLOs of your model.
49
+
50
+ To learn more about the various XProf tools, check out the [XProf documentation](https://openxla.org/xprof)
51
+
52
+ ## Demo
53
+ First time user? Come and check out this [Colab Demo](https://docs.jaxstack.ai/en/latest/JAX_for_LLM_pretraining.html).
54
+
55
+ ## Quick Start
56
+
57
+ ### Prerequisites
58
+
59
+ * xprof >= 2.20.0
60
+ * (optional) TensorBoard >= 2.20.0
61
+
62
+ Note: XProf requires access to the Internet to load the [Google Chart library](https://developers.google.com/chart/interactive/docs/basic_load_libs#basic-library-loading).
63
+ Some charts and tables may be missing if you run XProf entirely offline on
64
+ your local machine, behind a corporate firewall, or in a datacenter.
65
+
66
+ If you use Google Cloud to run your workloads, we recommend the
67
+ [xprofiler tool](https://github.com/AI-Hypercomputer/cloud-diagnostics-xprof).
68
+ It provides a streamlined profile collection and viewing experience using VMs
69
+ running XProf.
70
+
71
+ ### Installation
72
+
73
+ To get the most recent release version of XProf, install it via pip:
74
+
75
+ ```
76
+ $ pip install xprof
77
+ ```
78
+
79
+ ## Running XProf
80
+
81
+ XProf can be launched as a standalone server or used as a plugin within
82
+ TensorBoard. For large-scale use, it can be deployed in a distributed mode with
83
+ separate aggregator and worker instances ([more details on it later in the
84
+ doc](#distributed-profiling)).
85
+
86
+ ### Command-Line Arguments
87
+
88
+ When launching XProf from the command line, you can use the following arguments:
89
+
90
+ * **`logdir`** (optional): The directory containing XProf profile data (files
91
+ ending in `.xplane.pb`). This can be provided as a positional argument or
92
+ with `-l` or `--logdir`. If provided, XProf will load and display profiles
93
+ from this directory. If omitted, XProf will start without loading any
94
+ profiles, and you can dynamically load profiles using `session_path` or
95
+ `run_path` URL parameters, as described in the [Log Directory
96
+ Structure](#log-directory-structure) section.
97
+ * **`-p <port>`**, **`--port <port>`**: The port for the XProf web server.
98
+ Defaults to `8791`.
99
+ * **`-gp <grpc_port>`**, **`--grpc_port <grpc_port>`**: The port for the gRPC
100
+ server used for distributed processing. Defaults to `50051`. This must be
101
+ different from `--port`.
102
+ * **`-wsa <addresses>`**, **`--worker_service_address <addresses>`**: A
103
+ comma-separated list of worker addresses (e.g., `host1:50051,host2:50051`)
104
+ for distributed processing. Defaults to to `0.0.0.0:<grpc_port>`.
105
+ * **`-hcpb`**, **`--hide_capture_profile_button`**: If set, hides the 'Capture
106
+ Profile' button in the UI.
107
+
108
+ ### Standalone
109
+
110
+ If you have profile data in a directory (e.g., `profiler/demo`), you can view it
111
+ by running:
112
+
113
+ ```
114
+ $ xprof profiler/demo --port=6006
115
+ ```
116
+
117
+ Or with the optional flag:
118
+
119
+ ```
120
+ $ xprof --logdir=profiler/demo --port=6006
121
+ ```
122
+
123
+ ### With TensorBoard
124
+
125
+ If you have TensorBoard installed, you can run:
126
+
127
+ ```
128
+ $ tensorboard --logdir=profiler/demo
129
+ ```
130
+
131
+ If you are behind a corporate firewall, you may need to include the `--bind_all`
132
+ tensorboard flag.
133
+
134
+ Go to `localhost:6006/#profile` of your browser, you should now see the demo
135
+ overview page show up.
136
+ Congratulations! You're now ready to capture a profile.
137
+
138
+ ### Log Directory Structure
139
+
140
+ When using XProf, profile data must be placed in a specific directory structure.
141
+ XProf expects `.xplane.pb` files to be in the following path:
142
+
143
+ ```
144
+ <log_dir>/plugins/profile/<session_name>/
145
+ ```
146
+
147
+ * `<log_dir>`: This is the root directory that you supply to `tensorboard
148
+ --logdir`.
149
+ * `plugins/profile/`: This is a required subdirectory.
150
+ * `<session_name>/`: Each subdirectory inside `plugins/profile/` represents a
151
+ single profiling session. The name of this directory will appear in the
152
+ TensorBoard UI dropdown to select the session.
153
+
154
+ **Example:**
155
+
156
+ If your log directory is structured like this:
157
+
158
+ ```
159
+ /path/to/your/log_dir/
160
+ └── plugins/
161
+ └── profile/
162
+ ├── my_experiment_run_1/
163
+ │ └── host0.xplane.pb
164
+ └── benchmark_20251107/
165
+ └── host1.xplane.pb
166
+ ```
167
+
168
+ You would launch TensorBoard with:
169
+
170
+ ```bash
171
+ tensorboard --logdir /path/to/your/log_dir/
172
+ ```
173
+
174
+ The runs `my_experiment_run_1` and `benchmark_20251107` will be available in the
175
+ "Sessions" tab of the UI.
176
+
177
+ You can also dynamically load sessions from a GCS bucket or local filesystem by
178
+ passing URL parameters when loading XProf in your browser. This method works
179
+ whether or not you provided a `logdir` at startup and is useful for viewing
180
+ profiles from various locations without restarting XProf.
181
+
182
+ For example, if you start XProf with no log directory:
183
+
184
+ ```bash
185
+ xprof
186
+ ```
187
+
188
+ You can load sessions using the following URL parameters.
189
+
190
+ Assume you have profile data stored on GCS or locally, structured like this:
191
+
192
+ ```
193
+ gs://your-bucket/profile_runs/
194
+ ├── my_experiment_run_1/
195
+ │ ├── host0.xplane.pb
196
+ │ └── host1.xplane.pb
197
+ └── benchmark_20251107/
198
+ └── host0.xplane.pb
199
+ ```
200
+
201
+ There are two URL parameters you can use:
202
+
203
+ * **`session_path`**: Use this to load a *single* session directly. The path
204
+ should point to a directory containing `.xplane.pb` files for one session.
205
+
206
+ * GCS Example:
207
+ `http://localhost:8791/?session_path=gs://your-bucket/profile_runs/my_experiment_run_1`
208
+ * Local Path Example:
209
+ `http://localhost:8791/?session_path=/path/to/profile_runs/my_experiment_run_1`
210
+ * Result: XProf will load the `my_experiment_run_1`
211
+ session, and you will see its data in the UI.
212
+
213
+ * **`run_path`**: Use this to point to a directory that contains *multiple*
214
+ session directories.
215
+
216
+ * GCS Example:
217
+ `http://localhost:8791/?run_path=gs://your-bucket/profile_runs/`
218
+ * Local Path Example:
219
+ `http://localhost:8791/?run_path=/path/to/profile_runs/`
220
+ * Result: XProf will list all session directories found under `run_path`
221
+ (i.e., `my_experiment_run_1` and `benchmark_20251107`) in the "Sessions"
222
+ dropdown in the UI, allowing you to switch between them.
223
+
224
+ **Loading Precedence**
225
+
226
+ If multiple sources are provided, XProf uses the following order of precedence
227
+ to determine which profiles to load:
228
+
229
+ 1. **`session_path`** URL parameter
230
+ 2. **`run_path`** URL parameter
231
+ 3. **`logdir`** command-line argument
232
+
233
+ ### Distributed Profiling
234
+
235
+ XProf supports distributed profile processing by using an aggregator that
236
+ distributes work to multiple XProf workers. This is useful for processing large
237
+ profiles or handling multiple users.
238
+
239
+ **Note**: Currently, distributed processing only benefits the following tools:
240
+ `overview_page`, `framework_op_stats`, `input_pipeline`, and `pod_viewer`.
241
+
242
+ **Note**: The ports used in these examples (`6006` for the aggregator HTTP
243
+ server, `9999` for the worker HTTP server, and `50051` for the worker gRPC
244
+ server) are suggestions and can be customized.
245
+
246
+ **Worker Node**
247
+
248
+ Each worker node should run XProf with a gRPC port exposed so it can receive
249
+ processing requests. You should also hide the capture button as workers are not
250
+ meant to be interacted with directly.
251
+
252
+ ```
253
+ $ xprof --grpc_port=50051 --port=9999 --hide_capture_profile_button
254
+ ```
255
+
256
+ **Aggregator Node**
257
+
258
+ The aggregator node runs XProf with the `--worker_service_address` flag pointing
259
+ to all available workers. Users will interact with aggregator node's UI.
260
+
261
+ ```
262
+ $ xprof --worker_service_address=<worker1_ip>:50051,<worker2_ip>:50051 --port=6006 --logdir=profiler/demo
263
+ ```
264
+
265
+ Replace `<worker1_ip>, <worker2_ip>` with the addresses of your worker machines.
266
+ Requests sent to the aggregator on port 6006 will be distributed among the
267
+ workers for processing.
268
+
269
+ For deploying a distributed XProf setup in a Kubernetes environment, see
270
+ [Kubernetes Deployment Guide](docs/kubernetes_deployment.md).
271
+
272
+ ## Nightlies
273
+
274
+ Every night, a nightly version of the package is released under the name of
275
+ `xprof-nightly`. This package contains the latest changes made by the XProf
276
+ developers.
277
+
278
+ To install the nightly version of profiler:
279
+
280
+ ```
281
+ $ pip uninstall xprof tensorboard-plugin-profile
282
+ $ pip install xprof-nightly
283
+ ```
284
+
285
+ ## Next Steps
286
+
287
+ * [JAX Profiling Guide](https://jax.readthedocs.io/en/latest/profiling.html#xprof-tensorboard-profiling)
288
+ * [PyTorch/XLA Profiling Guide](https://cloud.google.com/tpu/docs/pytorch-xla-performance-profiling-tpu-vm)
289
+ * [TensorFlow Profiling Guide](https://tensorflow.org/guide/profiler)
290
+ * [Cloud TPU Profiling Guide](https://cloud.google.com/tpu/docs/cloud-tpu-tools)
291
+ * [Colab Tutorial](https://www.tensorflow.org/tensorboard/tensorboard_profiling_keras)
292
+ * [Tensorflow Colab](https://www.tensorflow.org/tensorboard/tensorboard_profiling_keras)
@@ -0,0 +1,5 @@
1
+ tensorboard_plugin_profile/__init__.py,sha256=S02OWyVtjEtTuaAFJkR3t8Q9GQj0ECwn1ZTN81RET6c,911
2
+ tbp_nightly-2.22.4a20260122.dist-info/METADATA,sha256=sk_O8IdoTOAOpBrowp3dJ-eL4Aqa7SYNnZyWRujCb34,10530
3
+ tbp_nightly-2.22.4a20260122.dist-info/WHEEL,sha256=BgGw3gVbpr3n1cHB4CMd6J5Qo5Ax2Gw-OumOEoOuhL0,94
4
+ tbp_nightly-2.22.4a20260122.dist-info/top_level.txt,sha256=lhPzC2a84VfVAbBlTgLUSZwuuUl9uTj5R1zZMylY1g8,27
5
+ tbp_nightly-2.22.4a20260122.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.10.1)
3
+ Root-Is-Purelib: true
4
+ Tag: cp310-none-any
5
+
@@ -0,0 +1 @@
1
+ tensorboard_plugin_profile
@@ -0,0 +1,22 @@
1
+ # Copyright 2025 The XProf Authors. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the 'License');
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an 'AS IS' BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ==============================================================================
15
+ """Passthrough __init__.py pointing to xprof."""
16
+
17
+ from xprof import convert
18
+ from xprof import profile_plugin
19
+ from xprof import profile_plugin_loader
20
+ from xprof import protobuf
21
+ from xprof import server
22
+ from xprof import version