Skip to content

Instantly share code, notes, and snippets.

@boopdotpng
Last active February 14, 2026 15:43
Show Gist options
  • Select an option

  • Save boopdotpng/4577ad1106d903d1566416823dee6140 to your computer and use it in GitHub Desktop.

Select an option

Save boopdotpng/4577ad1106d903d1566416823dee6140 to your computer and use it in GitHub Desktop.
clone important tenstorrent repositories
#!/usr/bin/env bash
set -euo pipefail
# Tenstorrent clone script (focused for building a tinygrad backend).
# Clones each repo as a sibling directory in the *current* directory.
#
# Usage:
# ./clone_tenstorrent.sh
#
# Optional env:
# CLONE_DEPTH=1 # shallow clone (omit or set empty for full history)
BASE_DIR="$(pwd)"
ORG_URL_BASE="https://github.com/tenstorrent"
clone_repo() {
local repo_name="$1"
local dest_dir="${BASE_DIR}/${repo_name}"
local url="${ORG_URL_BASE}/${repo_name}.git"
local depth_args=()
if [[ -n "${CLONE_DEPTH:-}" ]]; then
depth_args=(--depth "${CLONE_DEPTH}")
fi
if [[ -d "${dest_dir}/.git" ]]; then
echo "==> Updating ${repo_name} in ${dest_dir}"
git -C "${dest_dir}" fetch --all --prune
git -C "${dest_dir}" pull --ff-only
else
echo "==> Cloning ${repo_name} into ${dest_dir}"
git clone "${depth_args[@]}" "${url}" "${dest_dir}"
fi
}
echo "Cloning into: ${BASE_DIR}"
echo
# TT-Metalium + TTNN runtime/examples (best starting point for kernels + runtime behavior)
clone_repo "tt-metal"
# Kernel-mode driver (device access plumbing on Linux)
clone_repo "tt-kmd"
# User-mode driver (host-side API layer above the KMD)
clone_repo "tt-umd"
# Low-level kernels (LLK) used by the stack; useful for kernel building blocks + dataflow
clone_repo "tt-llk"
# Early-stage Python DSL for authoring high-performance custom kernels (experimental)
clone_repo "tt-lang"
# Compiler/IR work (MLIR-based components used across compiler efforts)
clone_repo "tt-mlir"
# SFPI toolchain bits used for building Tensix kernels (LLK depends on this ecosystem)
clone_repo "sfpi"
# ISA documentation (critical reference when you get into low-level/kernel correctness)
clone_repo "tt-isa-documentation"
# Hardware debug tooling (helps when bring-up/debugging gets gnarly)
clone_repo "tt-exalens"
# TTNN visualizer (helps understand graphs/tensors/execution)
clone_repo "ttnn-visualizer"
# Perf report tooling (parses/analyzes performance traces; useful once you optimize)
clone_repo "tt-perf-report"
# Firmware repo (firmware images/notes used for device bring-up)
clone_repo "tt-firmware"
# Flashing utility for firmware updates
clone_repo "tt-flash"
# PyTorch integration via XLA/PJRT path (useful for model execution workflows)
clone_repo "tt-xla"
# card status, telemetry, power usage, fan speed, etc. smi
clone_repo "tt-smi"
# actual device firmware
clone_repo "tt-zephyr-platforms"
echo
echo "Done."
echo "Tip: set CLONE_DEPTH=1 for faster shallow clones (e.g., CLONE_DEPTH=1 ./clone_tenstorrent.sh)."
@boopdotpng
Copy link
Author

these are all the important tenstorrent repos for reverse engineering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment