This is a simple demonstration of XProf's capabilites, on an example training workload running on Cloud TPUs.
# Install the stable version of XProfpip install -U xprof
# Update protobuf version in the environmentpip install -U protobuf
# git clone the xprof repo so we have access to the demo data theregit clone http://github.com/openxla/xprof
Cloning into 'xprof'... warning: redirecting to https://github.com/openxla/xprof/ remote: Enumerating objects: 25588, done. remote: Counting objects: 0% (1/5234) remote: Counting objects: 1% (53/5234) remote: Counting objects: 2% (105/5234) remote: Counting objects: 3% (158/5234) remote: Counting objects: 4% (210/5234) remote: Counting objects: 5% (262/5234) remote: Counting objects: 6% (315/5234) remote: Counting objects: 7% (367/5234) remote: Counting objects: 8% (419/5234) remote: Counting objects: 9% (472/5234) remote: Counting objects: 10% (524/5234) remote: Counting objects: 11% (576/5234) remote: Counting objects: 12% (629/5234) remote: Counting objects: 13% (681/5234) remote: Counting objects: 14% (733/5234) remote: Counting objects: 15% (786/5234) remote: Counting objects: 16% (838/5234) remote: Counting objects: 17% (890/5234) remote: Counting objects: 18% (943/5234) remote: Counting objects: 19% (995/5234) remote: Counting objects: 20% (1047/5234) remote: Counting objects: 21% (1100/5234) remote: Counting objects: 22% (1152/5234) remote: Counting objects: 23% (1204/5234) remote: Counting objects: 24% (1257/5234) remote: Counting objects: 25% (1309/5234) remote: Counting objects: 26% (1361/5234) remote: Counting objects: 27% (1414/5234) remote: Counting objects: 28% (1466/5234) remote: Counting objects: 29% (1518/5234) remote: Counting objects: 30% (1571/5234) remote: Counting objects: 31% (1623/5234) remote: Counting objects: 32% (1675/5234) remote: Counting objects: 33% (1728/5234) remote: Counting objects: 34% (1780/5234) remote: Counting objects: 35% (1832/5234) remote: Counting objects: 36% (1885/5234) remote: Counting objects: 37% (1937/5234) remote: Counting objects: 38% (1989/5234) remote: Counting objects: 39% (2042/5234) remote: Counting objects: 40% (2094/5234) remote: Counting objects: 41% (2146/5234) remote: Counting objects: 42% (2199/5234) remote: Counting objects: 43% (2251/5234) remote: Counting objects: 44% (2303/5234) remote: Counting objects: 45% (2356/5234) remote: Counting objects: 46% (2408/5234) remote: Counting objects: 47% (2460/5234) remote: Counting objects: 48% (2513/5234) remote: Counting objects: 49% (2565/5234) remote: Counting objects: 50% (2617/5234) remote: Counting objects: 51% (2670/5234) remote: Counting objects: 52% (2722/5234) remote: Counting objects: 53% (2775/5234) remote: Counting objects: 54% (2827/5234) remote: Counting objects: 55% (2879/5234) remote: Counting objects: 56% (2932/5234) remote: Counting objects: 57% (2984/5234) remote: Counting objects: 58% (3036/5234) remote: Counting objects: 59% (3089/5234) remote: Counting objects: 60% (3141/5234) remote: Counting objects: 61% (3193/5234) remote: Counting objects: 62% (3246/5234) remote: Counting objects: 63% (3298/5234) remote: Counting objects: 64% (3350/5234) remote: Counting objects: 65% (3403/5234) remote: Counting objects: 66% (3455/5234) remote: Counting objects: 67% (3507/5234) remote: Counting objects: 68% (3560/5234) remote: Counting objects: 69% (3612/5234) remote: Counting objects: 70% (3664/5234) remote: Counting objects: 71% (3717/5234) remote: Counting objects: 72% (3769/5234) remote: Counting objects: 73% (3821/5234) remote: Counting objects: 74% (3874/5234) remote: Counting objects: 75% (3926/5234) remote: Counting objects: 76% (3978/5234) remote: Counting objects: 77% (4031/5234) remote: Counting objects: 78% (4083/5234) remote: Counting objects: 79% (4135/5234) remote: Counting objects: 80% (4188/5234) remote: Counting objects: 81% (4240/5234) remote: Counting objects: 82% (4292/5234) remote: Counting objects: 83% (4345/5234) remote: Counting objects: 84% (4397/5234) remote: Counting objects: 85% (4449/5234) remote: Counting objects: 86% (4502/5234) remote: Counting objects: 87% (4554/5234) remote: Counting objects: 88% (4606/5234) remote: Counting objects: 89% (4659/5234) remote: Counting objects: 90% (4711/5234) remote: Counting objects: 91% (4763/5234) remote: Counting objects: 92% (4816/5234) remote: Counting objects: 93% (4868/5234) remote: Counting objects: 94% (4920/5234) remote: Counting objects: 95% (4973/5234) remote: Counting objects: 96% (5025/5234) remote: Counting objects: 97% (5077/5234) remote: Counting objects: 98% (5130/5234) remote: Counting objects: 99% (5182/5234) remote: Counting objects: 100% (5234/5234) remote: Counting objects: 100% (5234/5234), done. remote: Compressing objects: 0% (1/544) remote: Compressing objects: 1% (6/544) remote: Compressing objects: 2% (11/544) remote: Compressing objects: 3% (17/544) remote: Compressing objects: 4% (22/544) remote: Compressing objects: 5% (28/544) remote: Compressing objects: 6% (33/544) remote: Compressing objects: 7% (39/544) remote: Compressing objects: 8% (44/544) remote: Compressing objects: 9% (49/544) remote: Compressing objects: 10% (55/544) remote: Compressing objects: 11% (60/544) remote: Compressing objects: 12% (66/544) remote: Compressing objects: 13% (71/544) remote: Compressing objects: 14% (77/544) remote: Compressing objects: 15% (82/544) remote: Compressing objects: 16% (88/544) remote: Compressing objects: 17% (93/544) remote: Compressing objects: 18% (98/544) remote: Compressing objects: 19% (104/544) remote: Compressing objects: 20% (109/544) remote: Compressing objects: 21% (115/544) remote: Compressing objects: 22% (120/544) remote: Compressing objects: 23% (126/544) remote: Compressing objects: 24% (131/544) remote: Compressing objects: 25% (136/544) remote: Compressing objects: 26% (142/544) remote: Compressing objects: 27% (147/544) remote: Compressing objects: 28% (153/544) remote: Compressing objects: 29% (158/544) remote: Compressing objects: 30% (164/544) remote: Compressing objects: 31% (169/544) remote: Compressing objects: 32% (175/544) remote: Compressing objects: 33% (180/544) remote: Compressing objects: 34% (185/544) remote: Compressing objects: 35% (191/544) remote: Compressing objects: 36% (196/544) remote: Compressing objects: 37% (202/544) remote: Compressing objects: 38% (207/544) remote: Compressing objects: 39% (213/544) remote: Compressing objects: 40% (218/544) remote: Compressing objects: 41% (224/544) remote: Compressing objects: 42% (229/544) remote: Compressing objects: 43% (234/544) remote: Compressing objects: 44% (240/544) remote: Compressing objects: 45% (245/544) remote: Compressing objects: 46% (251/544) remote: Compressing objects: 47% (256/544) remote: Compressing objects: 48% (262/544) remote: Compressing objects: 49% (267/544) remote: Compressing objects: 50% (272/544) remote: Compressing objects: 51% (278/544) remote: Compressing objects: 52% (283/544) remote: Compressing objects: 53% (289/544) remote: Compressing objects: 54% (294/544) remote: Compressing objects: 55% (300/544) remote: Compressing objects: 56% (305/544) remote: Compressing objects: 57% (311/544) remote: Compressing objects: 58% (316/544) remote: Compressing objects: 59% (321/544) remote: Compressing objects: 60% (327/544) remote: Compressing objects: 61% (332/544) remote: Compressing objects: 62% (338/544) remote: Compressing objects: 63% (343/544) remote: Compressing objects: 64% (349/544) remote: Compressing objects: 65% (354/544) remote: Compressing objects: 66% (360/544) remote: Compressing objects: 67% (365/544) remote: Compressing objects: 68% (370/544) remote: Compressing objects: 69% (376/544) remote: Compressing objects: 70% (381/544) remote: Compressing objects: 71% (387/544) remote: Compressing objects: 72% (392/544) remote: Compressing objects: 73% (398/544) remote: Compressing objects: 74% (403/544) remote: Compressing objects: 75% (408/544) remote: Compressing objects: 76% (414/544) remote: Compressing objects: 77% (419/544) remote: Compressing objects: 78% (425/544) remote: Compressing objects: 79% (430/544) remote: Compressing objects: 80% (436/544) remote: Compressing objects: 81% (441/544) remote: Compressing objects: 82% (447/544) remote: Compressing objects: 83% (452/544) remote: Compressing objects: 84% (457/544) remote: Compressing objects: 85% (463/544) remote: Compressing objects: 86% (468/544) remote: Compressing objects: 87% (474/544) remote: Compressing objects: 88% (479/544) remote: Compressing objects: 89% (485/544) remote: Compressing objects: 90% (490/544) remote: Compressing objects: 91% (496/544) remote: Compressing objects: 92% (501/544) remote: Compressing objects: 93% (506/544) remote: Compressing objects: 94% (512/544) remote: Compressing objects: 95% (517/544) remote: Compressing objects: 96% (523/544) remote: Compressing objects: 97% (528/544) remote: Compressing objects: 98% (534/544) remote: Compressing objects: 99% (539/544) remote: Compressing objects: 100% (544/544) remote: Compressing objects: 100% (544/544), done. Receiving objects: 0% (1/25588) Receiving objects: 1% (256/25588) Receiving objects: 2% (512/25588) Receiving objects: 3% (768/25588) Receiving objects: 4% (1024/25588) Receiving objects: 5% (1280/25588) Receiving objects: 6% (1536/25588) Receiving objects: 7% (1792/25588) Receiving objects: 8% (2048/25588) Receiving objects: 9% (2303/25588) Receiving objects: 10% (2559/25588), 16.40 MiB | 32.79 MiB/s Receiving objects: 11% (2815/25588), 16.40 MiB | 32.79 MiB/s Receiving objects: 12% (3071/25588), 16.40 MiB | 32.79 MiB/s Receiving objects: 13% (3327/25588), 16.40 MiB | 32.79 MiB/s Receiving objects: 14% (3583/25588), 16.40 MiB | 32.79 MiB/s Receiving objects: 15% (3839/25588), 16.40 MiB | 32.79 MiB/s Receiving objects: 15% (3980/25588), 35.20 MiB | 35.20 MiB/s Receiving objects: 16% (4095/25588), 35.20 MiB | 35.20 MiB/s Receiving objects: 17% (4350/25588), 35.20 MiB | 35.20 MiB/s Receiving objects: 18% (4606/25588), 35.20 MiB | 35.20 MiB/s Receiving objects: 19% (4862/25588), 35.20 MiB | 35.20 MiB/s Receiving objects: 20% (5118/25588), 35.20 MiB | 35.20 MiB/s Receiving objects: 21% (5374/25588), 35.20 MiB | 35.20 MiB/s Receiving objects: 22% (5630/25588), 35.20 MiB | 35.20 MiB/s Receiving objects: 23% (5886/25588), 35.20 MiB | 35.20 MiB/s Receiving objects: 24% (6142/25588), 35.20 MiB | 35.20 MiB/s Receiving objects: 25% (6397/25588), 48.83 MiB | 32.55 MiB/s Receiving objects: 26% (6653/25588), 48.83 MiB | 32.55 MiB/s Receiving objects: 27% (6909/25588), 48.83 MiB | 32.55 MiB/s Receiving objects: 28% (7165/25588), 48.83 MiB | 32.55 MiB/s Receiving objects: 28% (7340/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 29% (7421/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 30% (7677/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 31% (7933/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 32% (8189/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 33% (8445/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 34% (8700/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 35% (8956/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 36% (9212/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 37% (9468/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 38% (9724/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 39% (9980/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 40% (10236/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 41% (10492/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 42% (10747/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 43% (11003/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 44% (11259/25588), 71.68 MiB | 35.84 MiB/s Receiving objects: 45% (11515/25588), 94.02 MiB | 37.61 MiB/s Receiving objects: 46% (11771/25588), 94.02 MiB | 37.61 MiB/s Receiving objects: 47% (12027/25588), 94.02 MiB | 37.61 MiB/s Receiving objects: 48% (12283/25588), 94.02 MiB | 37.61 MiB/s Receiving objects: 49% (12539/25588), 94.02 MiB | 37.61 MiB/s Receiving objects: 50% (12794/25588), 94.02 MiB | 37.61 MiB/s Receiving objects: 51% (13050/25588), 94.02 MiB | 37.61 MiB/s Receiving objects: 52% (13306/25588), 94.02 MiB | 37.61 MiB/s Receiving objects: 53% (13562/25588), 94.02 MiB | 37.61 MiB/s Receiving objects: 54% (13818/25588), 94.02 MiB | 37.61 MiB/s Receiving objects: 55% (14074/25588), 94.02 MiB | 37.61 MiB/s Receiving objects: 56% (14330/25588), 94.02 MiB | 37.61 MiB/s Receiving objects: 57% (14586/25588), 94.02 MiB | 37.61 MiB/s Receiving objects: 57% (14653/25588), 94.02 MiB | 37.61 MiB/s Receiving objects: 58% (14842/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 59% (15097/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 60% (15353/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 61% (15609/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 62% (15865/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 63% (16121/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 64% (16377/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 65% (16633/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 66% (16889/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 67% (17144/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 68% (17400/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 69% (17656/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 70% (17912/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 71% (18168/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 72% (18424/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 73% (18680/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 74% (18936/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 75% (19191/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 76% (19447/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 77% (19703/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 78% (19959/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 79% (20215/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 80% (20471/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 81% (20727/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 82% (20983/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 83% (21239/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 84% (21494/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 85% (21750/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 86% (22006/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 87% (22262/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 88% (22518/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 89% (22774/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 90% (23030/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 91% (23286/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 92% (23541/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 93% (23797/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 94% (24053/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 95% (24309/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 96% (24565/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 97% (24821/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 98% (25077/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 99% (25333/25588), 108.58 MiB | 36.19 MiB/s remote: Total 25588 (delta 4874), reused 4710 (delta 4690), pack-reused 20354 (from 1) Receiving objects: 100% (25588/25588), 108.58 MiB | 36.19 MiB/s Receiving objects: 100% (25588/25588), 118.17 MiB | 36.46 MiB/s, done. Resolving deltas: 0% (0/19969) Resolving deltas: 1% (255/19969) Resolving deltas: 2% (450/19969) Resolving deltas: 3% (601/19969) Resolving deltas: 4% (835/19969) Resolving deltas: 5% (1006/19969) Resolving deltas: 6% (1210/19969) Resolving deltas: 7% (1403/19969) Resolving deltas: 8% (1601/19969) Resolving deltas: 9% (1806/19969) Resolving deltas: 10% (2005/19969) Resolving deltas: 11% (2197/19969) Resolving deltas: 12% (2404/19969) Resolving deltas: 13% (2621/19969) Resolving deltas: 14% (2812/19969) Resolving deltas: 15% (2999/19969) Resolving deltas: 16% (3217/19969) Resolving deltas: 17% (3426/19969) Resolving deltas: 18% (3606/19969) Resolving deltas: 19% (3803/19969) Resolving deltas: 20% (3994/19969) Resolving deltas: 21% (4198/19969) Resolving deltas: 22% (4400/19969) Resolving deltas: 23% (4596/19969) Resolving deltas: 24% (4799/19969) Resolving deltas: 25% (5152/19969) Resolving deltas: 26% (5243/19969) Resolving deltas: 27% (5435/19969) Resolving deltas: 28% (5755/19969) Resolving deltas: 29% (5802/19969) Resolving deltas: 30% (5998/19969) Resolving deltas: 31% (6195/19969) Resolving deltas: 32% (6395/19969) Resolving deltas: 33% (6593/19969) Resolving deltas: 34% (6821/19969) Resolving deltas: 35% (6997/19969) Resolving deltas: 36% (7317/19969) Resolving deltas: 37% (7390/19969) Resolving deltas: 38% (7634/19969) Resolving deltas: 39% (7796/19969) Resolving deltas: 40% (8005/19969) Resolving deltas: 41% (8262/19969) Resolving deltas: 42% (8422/19969) Resolving deltas: 43% (8591/19969) Resolving deltas: 44% (8798/19969) Resolving deltas: 45% (8993/19969) Resolving deltas: 46% (9191/19969) Resolving deltas: 47% (9386/19969) Resolving deltas: 48% (9647/19969) Resolving deltas: 49% (9816/19969) Resolving deltas: 50% (10007/19969) Resolving deltas: 51% (10187/19969) Resolving deltas: 52% (10387/19969) Resolving deltas: 53% (10584/19969) Resolving deltas: 54% (10799/19969) Resolving deltas: 55% (10986/19969) Resolving deltas: 56% (11199/19969) Resolving deltas: 57% (11392/19969) Resolving deltas: 58% (11584/19969) Resolving deltas: 59% (11782/19969) Resolving deltas: 60% (11982/19969) Resolving deltas: 61% (12182/19969) Resolving deltas: 62% (12382/19969) Resolving deltas: 64% (12784/19969) Resolving deltas: 65% (13028/19969) Resolving deltas: 66% (13193/19969) Resolving deltas: 67% (13419/19969) Resolving deltas: 68% (13608/19969) Resolving deltas: 69% (13782/19969) Resolving deltas: 70% (13982/19969) Resolving deltas: 72% (14418/19969) Resolving deltas: 73% (14611/19969) Resolving deltas: 74% (14779/19969) Resolving deltas: 75% (14979/19969) Resolving deltas: 79% (15872/19969) Resolving deltas: 80% (16071/19969) Resolving deltas: 81% (16271/19969) Resolving deltas: 82% (16474/19969) Resolving deltas: 83% (16600/19969) Resolving deltas: 84% (16777/19969) Resolving deltas: 89% (17780/19969) Resolving deltas: 90% (17986/19969) Resolving deltas: 91% (18206/19969) Resolving deltas: 92% (18387/19969) Resolving deltas: 94% (18810/19969) Resolving deltas: 95% (18996/19969) Resolving deltas: 96% (19186/19969) Resolving deltas: 97% (19534/19969) Resolving deltas: 98% (19605/19969) Resolving deltas: 99% (19827/19969) Resolving deltas: 100% (19969/19969) Resolving deltas: 100% (19969/19969), 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.