{
    "archive_path": "archive/1792534000.896362",
    "base_url": "github.com/google-pytorch/torch_tpu",
    "basename": "torch_tpu",
    "bookmarked_date": "2026-10-20 22:06",
    "canonical": {
        "archive_org_path": "https://web.archive.org/web/github.com/google-pytorch/torch_tpu",
        "dom_path": "output.html",
        "favicon_path": "favicon.ico",
        "git_path": "git/",
        "google_favicon_path": "https://www.google.com/s2/favicons?domain=github.com",
        "headers_path": "headers.json",
        "htmltotext_path": "htmltotext.txt",
        "index_path": "index.html",
        "media_path": "media/",
        "mercury_path": "mercury/content.html",
        "pdf_path": "output.pdf",
        "readability_path": "readability/content.html",
        "screenshot_path": "screenshot.png",
        "singlefile_path": "singlefile.html",
        "warc_path": "warc/",
        "wget_path": "github.com/google-pytorch/torch_tpu.html"
    },
    "domain": "github.com",
    "extension": "",
    "hash": "9SKJ7CEWMWGR73H4P2AV",
    "history": {
        "archive_org": [],
        "dom": [],
        "favicon": [
            {
                "cmd": [
                    "curl",
                    "--silent",
                    "--location",
                    "--compressed",
                    "--max-time",
                    "120",
                    "--output",
                    "favicon.ico",
                    "--user-agent",
                    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.4 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.14.1 (x86_64-pc-linux-gnu)",
                    "https://www.google.com/s2/favicons?domain=github.com"
                ],
                "cmd_version": "curl 8.14.1 (x86_64-pc-linux-gnu)",
                "end_ts": "2026-10-20T22:08:12.285995+00:00",
                "index_texts": null,
                "output": "favicon.ico",
                "pwd": "/data/archive/1792534000.896362",
                "schema": "ArchiveResult",
                "start_ts": "2026-10-20T22:08:11.798437+00:00",
                "status": "succeeded"
            }
        ],
        "git": [],
        "headers": [
            {
                "cmd": [
                    "curl",
                    "--silent",
                    "--location",
                    "--compressed",
                    "--head",
                    "--max-time",
                    "120",
                    "--user-agent",
                    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.4 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.14.1 (x86_64-pc-linux-gnu)",
                    "https://github.com/google-pytorch/torch_tpu"
                ],
                "cmd_version": "curl 8.14.1 (x86_64-pc-linux-gnu)",
                "end_ts": "2026-10-20T22:08:13.028796+00:00",
                "index_texts": null,
                "output": "headers.json",
                "pwd": "/data/archive/1792534000.896362",
                "schema": "ArchiveResult",
                "start_ts": "2026-10-20T22:08:12.295805+00:00",
                "status": "succeeded"
            }
        ],
        "htmltotext": [],
        "media": [],
        "mercury": [
            {
                "cmd": [
                    "/app/node_modules/@postlight/parser/cli.js",
                    "https://github.com/google-pytorch/torch_tpu"
                ],
                "cmd_version": "1.0.0",
                "end_ts": "2026-10-20T22:08:28.775315+00:00",
                "index_texts": null,
                "output": "mercury",
                "pwd": "/data/archive/1792534000.896362",
                "schema": "ArchiveResult",
                "start_ts": "2026-10-20T22:08:23.155160+00:00",
                "status": "succeeded"
            }
        ],
        "pdf": [],
        "readability": [
            {
                "cmd": [
                    "/app/node_modules/readability-extractor/readability-extractor",
                    "/tmp/tmp3s3iinij",
                    "https://github.com/google-pytorch/torch_tpu"
                ],
                "cmd_version": "0.0.11",
                "end_ts": "2026-10-20T22:08:23.143026+00:00",
                "index_texts": [
                    "Description\nThis project provides a PyTorch backend for Google's Tensor Processing Units\n(TPUs), enabling users to run PyTorch models and operations on TPU devices. It\nincludes custom ATen kernels for various PyTorch operations, a compilation cache\nfor optimizing execution, and examples for distributed training and model\ninference.\nFeatures\n\nPyTorch ATen kernel implementation for TPU.\nCompilation cache for optimized execution of XLA computations.\nSupport for distributed training (Data Parallelism, Tensor Parallelism).\nExamples for various models (Llama, Qwen, ResNet, DLRM, minGPT, UNet).\nIntegration with torch.compile() for graph mode execution.\nUtilities for debugging and benchmarking.\n\nUser Guide and Interactive Notebooks\nA user guide is available at\nhttps://torchtpu.readthedocs.io/. This is a\nstatic version of the interactive notebooks. They are available in the docs\nfolder.\nThe notebooks are Marimo (similar to Jupyter). They can be run with marimo edit file.py and then you can access them in your browser. You will need to be\nrunning this from a TPU VM, a v6e GCE instance is easiest.\nInstallation\nThe same instructions are available in the user guide linked above.\n\nTorchTPU's Python version support policy matches\nPyTorch's Release Compatibility Matrix.\nCurrently, Python 3.11+ is supported. See the\nPython Version Support Policy for\nmore details.\n\nFirst create a Python virtual environment:\npython -m venv .venv\nsource .venv/bin/activate\nor, with uv\nuv venv .venv\nsource .venv/bin/activate\nInstall via pip\nInstall the latest public release\n(0.2.0 on PyPI) (for uv prepend\nuv to all pip commands):\npip install torch_tpu==0.2.0 --extra-index-url https://download.pytorch.org/whl/cpu\nBuild from source\nWheels can be built via:\nbazel build --config=wheel_common //ci/wheel:torch_tpu_wheel\nAll OSS Bazel builds default to optimized mode (-c opt) automatically via\n.bazelrc. Unoptimized builds (-c fastbuild, -c dbg) can degrade\nperformance and are not used for wheel builds. If you are developing or\ndebugging C++ code and explicitly want an unoptimized wheel, pass\n--//:allow_unoptimized_wheel=True:\nbazel build -c dbg --config=wheel_common //ci/wheel:torch_tpu_wheel \\\n    --//:allow_unoptimized_wheel=True\n--config=wheel_common is required, and the build fails at build time without\nit. The config sets --//:wheel_build=True, which routes the shared XLA/MLIR\nbackend through the torch_version-reset transition so that pywrap factors it\ninto a single libxla_base.so; built without the flag, every per-version common\nships its own copy of the backend and the resulting wheel aborts on import torch with duplicate static registrations.\nwheel_common also turns on the Remote Build Execution (RBE) remote cache and\nremote executor. If you do not have RBE credentials, append --config=no_rbe to\nstrip those flags back out:\nbazel build --config=wheel_common //ci/wheel:torch_tpu_wheel --config=no_rbe\nThe order matters here: --config=no_rbe has to come after\n--config=wheel_common, because the later config is the one that wins for the\nremote-cache and remote-executor flags they both set.\nInstall wheel via:\ncd <path_to_repo>\npython -m venv .venv; source .venv/bin/activate\n# The extra-index-url provides the CPU version of torch rather than the default CUDA build.\npip install ../bazel-bin/ci/wheel/*.whl --extra-index-url https://download.pytorch.org/whl/cpu\nNote that installing without --extra-index-url https://download.pytorch.org/whl/cpu will install the CUDA version of torch;\npass --extra-index-url as shown above or install the CPU build separately.\nGetting Started\nSome pointers to get you started:\n\nPyTorch: Official PyTorch documentation\nTutorials and examples: easy to understand PyTorch code using TorchTPU\nPublic APIs: the TorchTPU APIs that you can use\n\nDependencies\nThe project uses Bazel for dependency management. Key Python dependencies are:\nTBD\nBazel setup\nThis project uses Bazel for building and dependency management.\nTo install Bazel, we actually install Bazelisk, which is a transparent wrapper\nthat handles downloading and installing Bazel itself.\nThere are several ways to install Bazelisk. Here are some common ways:\n\n\nIf you have Go installed:\ngo install github.com/bazelbuild/bazelisk@latest\n\n\n\nDownload the binary directly:\nwget -O ~/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-linux-amd64\n\n\n\nSee the\nBazelisk README\nfor more install instructions\nHowever you install it, add it's location to PATH.\nTo verify the install, run bazel info in the repo's root directory:\n\nIt should print information about the repo without errors.\nVSCode clangd Setup\nFor C++ code navigation, it is recommended to use VSCode with\nclangd extension.\nRelying on a\ncompilation database\ngenerated from Bazel action graph, clangd is able to\nenrich the editor with various smart features, including code completions, go-to\ndefinitions, etc.\n\n\nInstall VSCode extensions via UI or the following command:\ncode --install-extension llvm-vs-code-extensions.vscode-clangd\n# Uninstall Microsoft C++ extensions to avoid interference.\ncode --uninstall-extension ms-vscode.cpptools\n\n\nGenerate the initial compile_commands.json:\n\n\n\nIt may take a while (> 30 minutes) for the first run to make a full build, but\nreruns will be incremental and cheap. If you have run bazel build recently,\ngenerated files already exist so you can pass --no-build to skip waiting for\nheavy builds (note that on a fresh workspace, skipping the build may prevent\nclangd from resolving generated files). See more options in the\nscript file-level comments.\nAlternatively, you can invoke the script via nox (arguments after -- are\nforwarded):\nnox -s refresh_compile_commands -- --no-build\nnox -s refresh_compile_commands -- //src/torch_tpu/ops/...\nContributing\nWe welcome contributions to the PyTorch on TPU project! Please see our\nCONTRIBUTING.md for guidelines on how to contribute,\nincluding signing our Contributor License Agreement (CLA) and code review\nprocesses.\nStar History\n\n  \n    \n    \n    \n  \n\nLicense\nThis project is licensed under the Apache 2.0 License. See the\nLICENSE file for details."
                ],
                "output": "readability",
                "pwd": "/data/archive/1792534000.896362",
                "schema": "ArchiveResult",
                "start_ts": "2026-10-20T22:08:19.824062+00:00",
                "status": "succeeded"
            }
        ],
        "screenshot": [],
        "singlefile": [],
        "title": [
            {
                "cmd": [
                    "curl",
                    "--silent",
                    "--location",
                    "--compressed",
                    "--max-time",
                    "120",
                    "--user-agent",
                    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.4 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.14.1 (x86_64-pc-linux-gnu)",
                    "https://github.com/google-pytorch/torch_tpu"
                ],
                "cmd_version": "curl 8.14.1 (x86_64-pc-linux-gnu)",
                "end_ts": "2026-10-20T22:08:19.813147+00:00",
                "index_texts": null,
                "output": "GitHub - google-pytorch/torch_tpu \u00b7 GitHub",
                "pwd": "/data/archive/1792534000.896362",
                "schema": "ArchiveResult",
                "start_ts": "2026-10-20T22:08:19.715249+00:00",
                "status": "succeeded"
            }
        ],
        "wget": [
            {
                "cmd": [
                    "wget",
                    "--no-verbose",
                    "--adjust-extension",
                    "--convert-links",
                    "--force-directories",
                    "--span-hosts",
                    "--no-parent",
                    "-e",
                    "robots=off",
                    "--reject=js,mjs,woff,woff2,ttf,otf,eot,mp4,m4v,mov,webm,ogv,mkv,avi,flv",
                    "--timeout=120",
                    "--restrict-file-names=windows",
                    "--page-requisites",
                    "--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.4 (+https://github.com/ArchiveBox/ArchiveBox/) wget/GNU Wget 1.21.3",
                    "--compression=auto",
                    "--timestamping",
                    "https://github.com/google-pytorch/torch_tpu"
                ],
                "cmd_version": "GNU Wget 1.21.3",
                "end_ts": "2026-10-20T22:08:19.705710+00:00",
                "index_texts": null,
                "output": "github.com/google-pytorch/torch_tpu.html",
                "pwd": "/data/archive/1792534000.896362",
                "schema": "ArchiveResult",
                "start_ts": "2026-10-20T22:08:13.038683+00:00",
                "status": "succeeded"
            }
        ]
    },
    "icons": null,
    "is_archived": true,
    "is_static": false,
    "latest": {
        "archive_org": null,
        "dom": null,
        "favicon": "favicon.ico",
        "git": null,
        "media": null,
        "pdf": null,
        "screenshot": null,
        "singlefile": null,
        "title": "GitHub - google-pytorch/torch_tpu \u00b7 GitHub",
        "warc": null,
        "wget": "github.com/google-pytorch/torch_tpu.html"
    },
    "link_dir": "/data/archive/1792534000.896362",
    "newest_archive_date": "2026-10-20T22:08:23.155160+00:00",
    "num_failures": 0,
    "num_outputs": 6,
    "oldest_archive_date": "2026-10-20T22:08:11.798437+00:00",
    "path": "/google-pytorch/torch_tpu",
    "schema": "Link",
    "scheme": "https",
    "snapshot_id": "5483675d-03db-4d0b-a2a6-53c3e465a2aa",
    "sources": [
        "/data/sources/1792534000-import.txt"
    ],
    "tags": null,
    "tags_str": "",
    "timestamp": "1792534000.896362",
    "title": "GitHub - google-pytorch/torch_tpu \u00b7 GitHub",
    "updated": "2026-10-20T22:08:11.796614+00:00",
    "updated_date": "2026-10-20 22:08",
    "url": "https://github.com/google-pytorch/torch_tpu"
}