AGENT SKILL

installation-and-launch

Install ColossalAI, verify PyTorch/CUDA and optional extensions, and launch distributed jobs through ColossalAI CLI or launch APIs.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
installation-and-launch
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Install ColossalAI, verify PyTorch/CUDA and optional extensions, and launch distributed jobs through ColossalAI CLI or launch APIs.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

Installation and Launch

Use this sub-skill when the task is about getting ColossalAI importable, interpreting colossalai check -i, using colossalai run, constructing hostfile or torchrun commands, or fixing distributed startup errors.

Route Here

  • Install colossalai from PyPI or source and decide whether BUILD_EXT=1 is appropriate.
  • Check Python, PyTorch, CUDA, GPU visibility, CUDA_HOME, and optional CUDA extension status.
  • Use colossalai check -i, colossalai --help, colossalai run --help, or CLI launcher flags.
  • Generate safe colossalai run commands for single-node, hostfile, include/exclude, extra launch args, or -m module mode.
  • Use colossalai.launch, launch_from_torch, launch_from_slurm, or launch_from_openmpi inside scripts.

Reroute

  • Choosing Booster plugins or writing the training loop: use ../booster-training/SKILL.md.
  • Deciding tensor/pipeline/sequence parallel topology: use ../parallelism-and-sharding/SKILL.md.
  • LLM or diffusion generation/inference commands: use ../inference-and-serving/SKILL.md.
  • ColossalChat, ColossalQA, ColossalEval, Colossal-LLaMA, or ColossalMoE environment isolation: use ../application-recipes/SKILL.md.

Fast Start

python ../../scripts/check_colossalai_environment.py --check-cli
colossalai check -i
colossalai run --nproc_per_node 1 train.py --arg value

Inside a script launched with torchrun or colossalai run, initialize ColossalAI with:

import colossalai
colossalai.launch_from_torch(seed=42)

For manual single-process initialization, pass explicit rank, world size, host, and port:

colossalai.launch(rank=0, world_size=1, host="127.0.0.1", port=29500)

References and Helpers

  • references/installation-and-backends.md explains install variants, PyTorch/CUDA checks, and optional extension signals.
  • references/cli-and-launch.md lists colossalai run flags, launch APIs, and safe command patterns.
  • references/troubleshooting.md maps install, CLI, hostfile, environment-variable, port, and NCCL failures to recovery steps.
  • scripts/colossalai_launch_builder.py safely builds launch commands without running the training script.

Operating Rules

  • Do not treat CPU import as proof of CUDA training or inference readiness.
  • Do not install broad app/test requirements just to fix a core import problem.
  • Do not run user training scripts from this sub-skill; generate or inspect commands, then route to the workflow owner.
  • Use a unique --master_port for concurrent jobs or repeated test runs on shared hosts.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351