tilelang-env-check

Validates TileLang-Ascend environment configuration and auto-repairs submodules, builds, and environment variables.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill tilelang-env-check-wangwindow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tilelang-env-check
Source: https://github.com/WangWindow/CANN-BatchMatMulMaxsum/tree/main/.agents/skills/tilelang-env-check
Command: npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill tilelang-env-check-wangwindow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires torch, torch_npu, tilelang, and includes scripts (resource) components.

What problem does it solve? Setting up a TileLang-Ascend development environment involves multiple fragile steps—Python package versions, CANN toolkit variables, git submodules, compilation artifacts, and environment variables—and a failure in any one of them produces confusing errors. This Skill systematically checks each layer, reports every problem found, and automatically repairs issues in the correct dependency order. ## Core Features & Use Cases - Layered Environment Verification: Checks torch/torch_npu versions (>= 2.6.0), CANN version (>= 8.3) via ASCEND_HOME_PATH, git submodule integrity, build artifacts, and environment variables (TL_ROOT, PYTHONPATH, ACL_OP_INIT_MODE). - Dependency-Ordered Auto-Repair: When submodules are incomplete it invokes the tilelang-submodule-pull skill, then forces recompilation with install_ascend.sh and re-sources set_env.sh, since stale build artifacts cannot be reused after submodule changes. - End-to-End Verification Test: Runs quick_verify.py, a minimal TileLang NPU kernel test, to confirm the environment actually works; test failures trigger the full submodule repair flow directly. - Use Case: After cloning the TileLang-Ascend repository on a new Ascend NPU machine, ask the agent to check the environment; it detects uninitialized submodules, pulls them, rebuilds, sets environment variables, and confirms with a passing kernel test. ## Quick Start Ask the agent to check whether the TileLang-Ascend development environment is correctly configured and to automatically fix any problems it finds.

Frequently Asked Questions about tilelang-env-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if my TileLang-Ascend environment is configured correctly?

Run the check_env.sh script from the skill directory using its absolute path, or ask the agent to perform an environment check. It verifies Python packages, CANN variables, submodules, build artifacts, and environment variables, then runs a quick NPU kernel test.

What versions of torch, torch_npu, and CANN does TileLang-Ascend require?

TileLang-Ascend requires torch and torch_npu version 2.6.0 or higher, and CANN version 8.3 or higher. The CANN version is detected from the ASCEND_HOME_PATH environment variable, and these prerequisite checks only report problems without auto-fixing them.

Why must I recompile after pulling missing git submodules?

Existing build artifacts were compiled from incomplete source code, so they cannot be trusted after submodules change. After pulling submodules you must rerun bash install_ascend.sh, then source set_env.sh, even if a build directory already exists.

Why does bash scripts/check_env.sh fail with No such file or directory?

The scripts live inside the skill's installation directory, not your current working directory. Locate the SKILL.md directory and invoke bash <SKILL_DIR>/scripts/check_env.sh; the script then locates the TileLang-Ascend repo via TILELANG_DIR or by searching upward for install_ascend.sh.

What does git submodule status prefix '-' or '+' mean for the environment check?

A '-' prefix means the submodule is uninitialized, and '+' means its commit differs from the index, indicating an incomplete checkout. Both are treated as incomplete and trigger the tilelang-submodule-pull repair flow; only an unprefixed entry with a non-empty directory counts as complete.

Does the environment check automatically fix missing torch or CANN installations?

No. The prerequisite checks for torch, torch_npu, and CANN only report problems and never auto-install or upgrade packages. The skill tells you the exact issue and asks whether to continue with the remaining repository checks.