Skip to content

Commit 54d33a5

Browse files
[CPU] Update repo references after triton-cpu -> flagtree-cpu rename (#650)
The flagos-ai/triton-cpu repository was renamed to flagos-ai/flagtree-cpu. - Rename python/scripts/link_triton_cpu.sh -> link_flagtree_cpu.sh and update its self-references (usage text, log prefix) - Rename the CLI flags --triton-cpu-{url,ref,path} -> --flagtree-cpu-* - Update the default clone URL and repo-name mentions in comments - Update the repo-name mention in tle_arm64 plugin comment The local checkout dir (third_party/triton-cpu/) is unchanged: the C++ component keeps its upstream name (TritonCPU dialect, TritonCPURuntime), so the directory name still matches what it contains. Co-authored-by: Kevin Zhao <kevinzs2049@gmail.com>
1 parent d7b18f7 commit 54d33a5

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/bash
2-
# link_triton_cpu.sh — set up flagos-ai/triton-cpu sources for the FlagTree
2+
# link_flagtree_cpu.sh — set up flagos-ai/flagtree-cpu sources for the FlagTree
33
# ARM64 CPU backend.
44
#
55
# The CPU backend's C++ extension layer (TritonCPU MLIR dialect + NEON/SVE2 C
6-
# runtime + Python TLE builtins) lives in the separate flagos-ai/triton-cpu
6+
# runtime + Python TLE builtins) lives in the separate flagos-ai/flagtree-cpu
77
# repository. This script:
88
#
9-
# 1. Ensures third_party/triton-cpu/ exists — either clones flagos-ai/triton-cpu
9+
# 1. Ensures third_party/triton-cpu/ exists — either clones flagos-ai/flagtree-cpu
1010
# fresh (default) or symlinks to an existing local clone via
11-
# --triton-cpu-path.
11+
# --flagtree-cpu-path.
1212
# 2. Creates the 12 symlinks the FlagTree CPU build expects at the standard
1313
# paths (include/triton/Dialect/TritonCPU, lib/Dialect/TritonCPU,
1414
# third_party/cpu/*, third_party/sleef,
@@ -20,9 +20,9 @@
2020
#
2121
# Usage (run from FlagTree root after `git checkout triton_v3.3.x`):
2222
#
23-
# bash python/scripts/link_triton_cpu.sh # clone fresh
24-
# bash python/scripts/link_triton_cpu.sh --triton-cpu-path PATH # reuse local clone
25-
# bash python/scripts/link_triton_cpu.sh --triton-cpu-ref <SHA> # pin a ref
23+
# bash python/scripts/link_flagtree_cpu.sh # clone fresh
24+
# bash python/scripts/link_flagtree_cpu.sh --flagtree-cpu-path PATH # reuse local clone
25+
# bash python/scripts/link_flagtree_cpu.sh --flagtree-cpu-ref <SHA> # pin a ref
2626
#
2727
# The script does not run pip install. After it succeeds, run:
2828
#
@@ -32,7 +32,7 @@
3232

3333
set -euo pipefail
3434

35-
TRITON_CPU_URL="https://github.com/flagos-ai/triton-cpu.git"
35+
TRITON_CPU_URL="https://github.com/flagos-ai/flagtree-cpu.git"
3636
TRITON_CPU_REF="main"
3737
TRITON_CPU_PATH=""
3838

@@ -43,25 +43,25 @@ usage() {
4343

4444
while [ $# -gt 0 ]; do
4545
case "$1" in
46-
--triton-cpu-url) TRITON_CPU_URL="$2"; shift 2 ;;
47-
--triton-cpu-ref) TRITON_CPU_REF="$2"; shift 2 ;;
48-
--triton-cpu-path) TRITON_CPU_PATH="$2"; shift 2 ;;
46+
--flagtree-cpu-url) TRITON_CPU_URL="$2"; shift 2 ;;
47+
--flagtree-cpu-ref) TRITON_CPU_REF="$2"; shift 2 ;;
48+
--flagtree-cpu-path) TRITON_CPU_PATH="$2"; shift 2 ;;
4949
-h|--help) usage 0 ;;
50-
*) echo "[link_triton_cpu] unknown arg: $1" >&2; usage 1 ;;
50+
*) echo "[link_flagtree_cpu] unknown arg: $1" >&2; usage 1 ;;
5151
esac
5252
done
5353

5454
ROOT=$(cd "$(dirname "$0")/../.." && pwd)
5555
TRITON_CPU_DIR="$ROOT/third_party/triton-cpu"
5656

57-
log() { echo "[link_triton_cpu] $*" >&2; }
58-
die() { echo "[link_triton_cpu] ERROR: $*" >&2; exit 1; }
57+
log() { echo "[link_flagtree_cpu] $*" >&2; }
58+
die() { echo "[link_flagtree_cpu] ERROR: $*" >&2; exit 1; }
5959

6060
log "FlagTree root: $ROOT"
6161

6262
# Step 1: ensure third_party/triton-cpu exists -------------------------------
6363
if [ -n "$TRITON_CPU_PATH" ]; then
64-
[ -d "$TRITON_CPU_PATH" ] || die "--triton-cpu-path $TRITON_CPU_PATH is not a directory"
64+
[ -d "$TRITON_CPU_PATH" ] || die "--flagtree-cpu-path $TRITON_CPU_PATH is not a directory"
6565
# Compute target as relative to third_party/ so the resulting symlink is
6666
# portable (the whole worktree can be moved without breaking links).
6767
REL_TARGET=$(realpath --relative-to="$(dirname "$TRITON_CPU_DIR")" "$TRITON_CPU_PATH")
@@ -78,7 +78,7 @@ if [ -n "$TRITON_CPU_PATH" ]; then
7878
elif [ -d "$TRITON_CPU_DIR/.git" ]; then
7979
log "third_party/triton-cpu already a git checkout; reusing"
8080
elif [ -e "$TRITON_CPU_DIR" ] && [ ! -L "$TRITON_CPU_DIR" ]; then
81-
die "$TRITON_CPU_DIR exists but is not a git checkout; remove it or pass --triton-cpu-path"
81+
die "$TRITON_CPU_DIR exists but is not a git checkout; remove it or pass --flagtree-cpu-path"
8282
else
8383
[ -L "$TRITON_CPU_DIR" ] && rm "$TRITON_CPU_DIR"
8484
log "cloning $TRITON_CPU_URL -> $TRITON_CPU_DIR"

third_party/tle_arm64/python/triton_tle_arm64.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// loads the TritonCPU dialect defensively before building its op.
1010
//
1111
// The MLIR op classes (cpu::SdotGemvOp, cpu::FusedMlpOp, etc.) live in
12-
// triton-cpu's TritonCPU dialect (TritonCPUOps.td) and compile into
12+
// flagtree-cpu's TritonCPU dialect (TritonCPUOps.td) and compile into
1313
// libtriton.so. This plugin only adds the Python builder methods so that
1414
// tle_ops.py can call _builder.create_cpu_*().
1515
//

0 commit comments

Comments
 (0)