XProf Demo

Open in Colab

This is a simple demonstration of XProf's capabilites, on an example training workload running on Cloud TPUs.

# Install the stable version of XProf
pip install -U xprof
# Update protobuf version in the environment
pip install -U protobuf
# git clone the xprof repo so we have access to the demo data there
git clone http://github.com/openxla/xprof
Cloning into 'xprof'...
warning: redirecting to https://github.com/openxla/xprof/
remote: Enumerating objects: 37819, done.
remote: Counting objects:   0% (1/1183)
remote: Counting objects:   1% (12/1183)
remote: Counting objects:   2% (24/1183)
remote: Counting objects:   3% (36/1183)
remote: Counting objects:   4% (48/1183)
remote: Counting objects:   5% (60/1183)
remote: Counting objects:   6% (71/1183)
remote: Counting objects:   7% (83/1183)
remote: Counting objects:   8% (95/1183)
remote: Counting objects:   9% (107/1183)
remote: Counting objects:  10% (119/1183)
remote: Counting objects:  11% (131/1183)
remote: Counting objects:  12% (142/1183)
remote: Counting objects:  13% (154/1183)
remote: Counting objects:  14% (166/1183)
remote: Counting objects:  15% (178/1183)
remote: Counting objects:  16% (190/1183)
remote: Counting objects:  17% (202/1183)
remote: Counting objects:  18% (213/1183)
remote: Counting objects:  19% (225/1183)
remote: Counting objects:  20% (237/1183)
remote: Counting objects:  21% (249/1183)
remote: Counting objects:  22% (261/1183)
remote: Counting objects:  23% (273/1183)
remote: Counting objects:  24% (284/1183)
remote: Counting objects:  25% (296/1183)
remote: Counting objects:  26% (308/1183)
remote: Counting objects:  27% (320/1183)
remote: Counting objects:  28% (332/1183)
remote: Counting objects:  29% (344/1183)
remote: Counting objects:  30% (355/1183)
remote: Counting objects:  31% (367/1183)
remote: Counting objects:  32% (379/1183)
remote: Counting objects:  33% (391/1183)
remote: Counting objects:  34% (403/1183)
remote: Counting objects:  35% (415/1183)
remote: Counting objects:  36% (426/1183)
remote: Counting objects:  37% (438/1183)
remote: Counting objects:  38% (450/1183)
remote: Counting objects:  39% (462/1183)
remote: Counting objects:  40% (474/1183)
remote: Counting objects:  41% (486/1183)
remote: Counting objects:  42% (497/1183)
remote: Counting objects:  43% (509/1183)
remote: Counting objects:  44% (521/1183)
remote: Counting objects:  45% (533/1183)
remote: Counting objects:  46% (545/1183)
remote: Counting objects:  47% (557/1183)
remote: Counting objects:  48% (568/1183)
remote: Counting objects:  49% (580/1183)
remote: Counting objects:  50% (592/1183)
remote: Counting objects:  51% (604/1183)
remote: Counting objects:  52% (616/1183)
remote: Counting objects:  53% (627/1183)
remote: Counting objects:  54% (639/1183)
remote: Counting objects:  55% (651/1183)
remote: Counting objects:  56% (663/1183)
remote: Counting objects:  57% (675/1183)
remote: Counting objects:  58% (687/1183)
remote: Counting objects:  59% (698/1183)
remote: Counting objects:  60% (710/1183)
remote: Counting objects:  61% (722/1183)
remote: Counting objects:  62% (734/1183)
remote: Counting objects:  63% (746/1183)
remote: Counting objects:  64% (758/1183)
remote: Counting objects:  65% (769/1183)
remote: Counting objects:  66% (781/1183)
remote: Counting objects:  67% (793/1183)
remote: Counting objects:  68% (805/1183)
remote: Counting objects:  69% (817/1183)
remote: Counting objects:  70% (829/1183)
remote: Counting objects:  71% (840/1183)
remote: Counting objects:  72% (852/1183)
remote: Counting objects:  73% (864/1183)
remote: Counting objects:  74% (876/1183)
remote: Counting objects:  75% (888/1183)
remote: Counting objects:  76% (900/1183)
remote: Counting objects:  77% (911/1183)
remote: Counting objects:  78% (923/1183)
remote: Counting objects:  79% (935/1183)
remote: Counting objects:  80% (947/1183)
remote: Counting objects:  81% (959/1183)
remote: Counting objects:  82% (971/1183)
remote: Counting objects:  83% (982/1183)
remote: Counting objects:  84% (994/1183)
remote: Counting objects:  85% (1006/1183)
remote: Counting objects:  86% (1018/1183)
remote: Counting objects:  87% (1030/1183)
remote: Counting objects:  88% (1042/1183)
remote: Counting objects:  89% (1053/1183)
remote: Counting objects:  90% (1065/1183)
remote: Counting objects:  91% (1077/1183)
remote: Counting objects:  92% (1089/1183)
remote: Counting objects:  93% (1101/1183)
remote: Counting objects:  94% (1113/1183)
remote: Counting objects:  95% (1124/1183)
remote: Counting objects:  96% (1136/1183)
remote: Counting objects:  97% (1148/1183)
remote: Counting objects:  98% (1160/1183)
remote: Counting objects:  99% (1172/1183)
remote: Counting objects: 100% (1183/1183)
remote: Counting objects: 100% (1183/1183), done.
remote: Compressing objects:   0% (1/456)
remote: Compressing objects:   1% (5/456)
remote: Compressing objects:   2% (10/456)
remote: Compressing objects:   3% (14/456)
remote: Compressing objects:   4% (19/456)
remote: Compressing objects:   5% (23/456)
remote: Compressing objects:   6% (28/456)
remote: Compressing objects:   7% (32/456)
remote: Compressing objects:   8% (37/456)
remote: Compressing objects:   9% (42/456)
remote: Compressing objects:  10% (46/456)
remote: Compressing objects:  11% (51/456)
remote: Compressing objects:  12% (55/456)
remote: Compressing objects:  13% (60/456)
remote: Compressing objects:  14% (64/456)
remote: Compressing objects:  15% (69/456)
remote: Compressing objects:  16% (73/456)
remote: Compressing objects:  17% (78/456)
remote: Compressing objects:  18% (83/456)
remote: Compressing objects:  19% (87/456)
remote: Compressing objects:  20% (92/456)
remote: Compressing objects:  21% (96/456)
remote: Compressing objects:  22% (101/456)
remote: Compressing objects:  23% (105/456)
remote: Compressing objects:  24% (110/456)
remote: Compressing objects:  25% (114/456)
remote: Compressing objects:  26% (119/456)
remote: Compressing objects:  27% (124/456)
remote: Compressing objects:  28% (128/456)
remote: Compressing objects:  29% (133/456)
remote: Compressing objects:  30% (137/456)
remote: Compressing objects:  31% (142/456)
remote: Compressing objects:  32% (146/456)
remote: Compressing objects:  33% (151/456)
remote: Compressing objects:  34% (156/456)
remote: Compressing objects:  35% (160/456)
remote: Compressing objects:  36% (165/456)
remote: Compressing objects:  37% (169/456)
remote: Compressing objects:  38% (174/456)
remote: Compressing objects:  39% (178/456)
remote: Compressing objects:  40% (183/456)
remote: Compressing objects:  41% (187/456)
remote: Compressing objects:  42% (192/456)
remote: Compressing objects:  43% (197/456)
remote: Compressing objects:  44% (201/456)
remote: Compressing objects:  45% (206/456)
remote: Compressing objects:  46% (210/456)
remote: Compressing objects:  47% (215/456)
remote: Compressing objects:  48% (219/456)
remote: Compressing objects:  49% (224/456)
remote: Compressing objects:  50% (228/456)
remote: Compressing objects:  51% (233/456)
remote: Compressing objects:  52% (238/456)
remote: Compressing objects:  53% (242/456)
remote: Compressing objects:  54% (247/456)
remote: Compressing objects:  55% (251/456)
remote: Compressing objects:  56% (256/456)
remote: Compressing objects:  57% (260/456)
remote: Compressing objects:  58% (265/456)
remote: Compressing objects:  59% (270/456)
remote: Compressing objects:  60% (274/456)
remote: Compressing objects:  61% (279/456)
remote: Compressing objects:  62% (283/456)
remote: Compressing objects:  63% (288/456)
remote: Compressing objects:  64% (292/456)
remote: Compressing objects:  65% (297/456)
remote: Compressing objects:  66% (301/456)
remote: Compressing objects:  67% (306/456)
remote: Compressing objects:  68% (311/456)
remote: Compressing objects:  69% (315/456)
remote: Compressing objects:  70% (320/456)
remote: Compressing objects:  71% (324/456)
remote: Compressing objects:  72% (329/456)
remote: Compressing objects:  73% (333/456)
remote: Compressing objects:  74% (338/456)
remote: Compressing objects:  75% (342/456)
remote: Compressing objects:  76% (347/456)
remote: Compressing objects:  77% (352/456)
remote: Compressing objects:  78% (356/456)
remote: Compressing objects:  79% (361/456)
remote: Compressing objects:  80% (365/456)
remote: Compressing objects:  81% (370/456)
remote: Compressing objects:  82% (374/456)
remote: Compressing objects:  83% (379/456)
remote: Compressing objects:  84% (384/456)
remote: Compressing objects:  85% (388/456)
remote: Compressing objects:  86% (393/456)
remote: Compressing objects:  87% (397/456)
remote: Compressing objects:  88% (402/456)
remote: Compressing objects:  89% (406/456)
remote: Compressing objects:  90% (411/456)
remote: Compressing objects:  91% (415/456)
remote: Compressing objects:  92% (420/456)
remote: Compressing objects:  93% (425/456)
remote: Compressing objects:  94% (429/456)
remote: Compressing objects:  95% (434/456)
remote: Compressing objects:  96% (438/456)
remote: Compressing objects:  97% (443/456)
remote: Compressing objects:  98% (447/456)
remote: Compressing objects:  99% (452/456)
remote: Compressing objects: 100% (456/456)
remote: Compressing objects: 100% (456/456), done.
Receiving objects:   0% (1/37819)
Receiving objects:   1% (379/37819)
Receiving objects:   2% (757/37819)
Receiving objects:   3% (1135/37819)
Receiving objects:   4% (1513/37819)
Receiving objects:   5% (1891/37819)
Receiving objects:   6% (2270/37819)
Receiving objects:   7% (2648/37819)
Receiving objects:   8% (3026/37819)
Receiving objects:   9% (3404/37819), 16.31 MiB | 32.62 MiB/s
Receiving objects:  10% (3782/37819), 16.31 MiB | 32.62 MiB/s
Receiving objects:  11% (4161/37819), 16.31 MiB | 32.62 MiB/s
Receiving objects:  12% (4539/37819), 16.31 MiB | 32.62 MiB/s
Receiving objects:  13% (4917/37819), 16.31 MiB | 32.62 MiB/s
Receiving objects:  14% (5295/37819), 16.31 MiB | 32.62 MiB/s
Receiving objects:  15% (5673/37819), 16.31 MiB | 32.62 MiB/s
Receiving objects:  15% (5760/37819), 36.86 MiB | 36.85 MiB/s
Receiving objects:  16% (6052/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  17% (6430/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  18% (6808/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  19% (7186/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  20% (7564/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  21% (7942/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  22% (8321/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  23% (8699/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  24% (9077/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  25% (9455/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  26% (9833/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  27% (10212/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  28% (10590/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  29% (10968/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  30% (11346/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  31% (11724/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  32% (12103/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  33% (12481/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  34% (12859/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  35% (13237/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  36% (13615/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  37% (13994/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  38% (14372/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  39% (14750/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  40% (15128/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  41% (15506/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  42% (15884/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  43% (16263/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  44% (16641/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  45% (17019/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  46% (17397/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  47% (17775/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  48% (18154/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  49% (18532/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  50% (18910/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  51% (19288/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  52% (19666/37819), 49.91 MiB | 33.27 MiB/s
Receiving objects:  52% (19778/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  53% (20045/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  54% (20423/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  55% (20801/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  56% (21179/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  57% (21557/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  58% (21936/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  59% (22314/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  60% (22692/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  61% (23070/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  62% (23448/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  63% (23826/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  64% (24205/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  65% (24583/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  66% (24961/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  67% (25339/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  68% (25717/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  69% (26096/37819), 68.48 MiB | 34.24 MiB/s
Receiving objects:  70% (26474/37819), 98.12 MiB | 39.25 MiB/s
Receiving objects:  71% (26852/37819), 98.12 MiB | 39.25 MiB/s
Receiving objects:  72% (27230/37819), 98.12 MiB | 39.25 MiB/s
Receiving objects:  73% (27608/37819), 98.12 MiB | 39.25 MiB/s
Receiving objects:  74% (27987/37819), 98.12 MiB | 39.25 MiB/s
Receiving objects:  74% (27990/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  75% (28365/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  76% (28743/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  77% (29121/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  78% (29499/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  79% (29878/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  80% (30256/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  81% (30634/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  82% (31012/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  83% (31390/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  84% (31768/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  85% (32147/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  86% (32525/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  87% (32903/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  88% (33281/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  89% (33659/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  90% (34038/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  91% (34416/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  92% (34794/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  93% (35172/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  94% (35550/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  95% (35929/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  96% (36307/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  97% (36685/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  98% (37063/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects:  99% (37441/37819), 115.62 MiB | 38.54 MiB/s
remote: Total 37819 (delta 898), reused 728 (delta 727), pack-reused 36636 (from 3)
Receiving objects: 100% (37819/37819), 115.62 MiB | 38.54 MiB/s
Receiving objects: 100% (37819/37819), 125.72 MiB | 38.11 MiB/s, done.
Resolving deltas:   0% (0/29412)
Resolving deltas:   1% (298/29412)
Resolving deltas:   2% (612/29412)
Resolving deltas:   3% (993/29412)
Resolving deltas:   4% (1210/29412)
Resolving deltas:   5% (1477/29412)
Resolving deltas:   6% (1772/29412)
Resolving deltas:   7% (2062/29412)
Resolving deltas:   8% (2362/29412)
Resolving deltas:   9% (2652/29412)
Resolving deltas:  10% (2945/29412)
Resolving deltas:  11% (3243/29412)
Resolving deltas:  12% (3538/29412)
Resolving deltas:  13% (3831/29412)
Resolving deltas:  14% (4128/29412)
Resolving deltas:  15% (4420/29412)
Resolving deltas:  16% (4811/29412)
Resolving deltas:  17% (5014/29412)
Resolving deltas:  18% (5323/29412)
Resolving deltas:  20% (5954/29412)
Resolving deltas:  21% (6182/29412)
Resolving deltas:  22% (6472/29412)
Resolving deltas:  23% (6782/29412)
Resolving deltas:  24% (7097/29412)
Resolving deltas:  25% (7404/29412)
Resolving deltas:  26% (7660/29412)
Resolving deltas:  27% (7967/29412)
Resolving deltas:  28% (8246/29412)
Resolving deltas:  29% (8533/29412)
Resolving deltas:  30% (8840/29412)
Resolving deltas:  31% (9123/29412)
Resolving deltas:  32% (9413/29412)
Resolving deltas:  33% (9709/29412)
Resolving deltas:  34% (10001/29412)
Resolving deltas:  35% (10297/29412)
Resolving deltas:  36% (10626/29412)
Resolving deltas:  37% (11078/29412)
Resolving deltas:  39% (11486/29412)
Resolving deltas:  40% (11789/29412)
Resolving deltas:  41% (12090/29412)
Resolving deltas:  42% (12372/29412)
Resolving deltas:  43% (12649/29412)
Resolving deltas:  44% (12943/29412)
Resolving deltas:  45% (13327/29412)
Resolving deltas:  46% (13534/29412)
Resolving deltas:  47% (13827/29412)
Resolving deltas:  48% (14147/29412)
Resolving deltas:  49% (14412/29412)
Resolving deltas:  50% (14725/29412)
Resolving deltas:  51% (15028/29412)
Resolving deltas:  52% (15303/29412)
Resolving deltas:  53% (15594/29412)
Resolving deltas:  54% (16023/29412)
Resolving deltas:  55% (16178/29412)
Resolving deltas:  57% (16906/29412)
Resolving deltas:  58% (17060/29412)
Resolving deltas:  59% (17363/29412)
Resolving deltas:  60% (17673/29412)
Resolving deltas:  62% (18372/29412)
Resolving deltas:  63% (18560/29412)
Resolving deltas:  64% (18840/29412)
Resolving deltas:  65% (19151/29412)
Resolving deltas:  66% (19448/29412)
Resolving deltas:  67% (19745/29412)
Resolving deltas:  68% (20002/29412)
Resolving deltas:  69% (20295/29412)
Resolving deltas:  70% (20608/29412)
Resolving deltas:  71% (20898/29412)
Resolving deltas:  72% (21199/29412)
Resolving deltas:  73% (21471/29412)
Resolving deltas:  74% (21765/29412)
Resolving deltas:  75% (22059/29412)
Resolving deltas:  76% (22360/29412)
Resolving deltas:  77% (22651/29412)
Resolving deltas:  78% (23007/29412)
Resolving deltas:  79% (23265/29412)
Resolving deltas:  80% (23546/29412)
Resolving deltas:  81% (23827/29412)
Resolving deltas:  82% (24123/29412)
Resolving deltas:  83% (24416/29412)
Resolving deltas:  84% (24714/29412)
Resolving deltas:  85% (25005/29412)
Resolving deltas:  86% (25452/29412)
Resolving deltas:  87% (25612/29412)
Resolving deltas:  88% (25890/29412)
Resolving deltas:  89% (26188/29412)
Resolving deltas:  90% (26473/29412)
Resolving deltas:  91% (26853/29412)
Resolving deltas:  92% (27175/29412)
Resolving deltas:  93% (27367/29412)
Resolving deltas:  94% (27648/29412)
Resolving deltas:  95% (27955/29412)
Resolving deltas:  96% (28238/29412)
Resolving deltas:  97% (28530/29412)
Resolving deltas:  98% (28939/29412)
Resolving deltas:  99% (29129/29412)
Resolving deltas: 100% (29412/29412)
Resolving deltas: 100% (29412/29412), done.
# Load the TensorBoard notebook extension.
%load_ext tensorboard
# Launch TensorBoard and navigate to the Profile tab to view performance profile
%tensorboard --logdir=xprof/demo

Once tensorboard loads the profile data, use the Tools dropdown to select the tool you want to explore. Please see the tool-specific documentation pages for explanations of each tool's outputs.