Skip to content

ci: 将 simulator 内部依赖统一到单一 venv#974

Draft
mouliangyu wants to merge 1 commit into
hw-native-sys:mainfrom
mouliangyu:codex/ci-sim-single-venv-main
Draft

ci: 将 simulator 内部依赖统一到单一 venv#974
mouliangyu wants to merge 1 commit into
hw-native-sys:mainfrom
mouliangyu:codex/ci-sim-single-venv-main

Conversation

@mouliangyu

Copy link
Copy Markdown
Collaborator

背景

ci-sim 的多个 self-hosted runner 会并发使用同一套全局 Python site-packages。PyPTO 和 simpler 在安装时会先卸载已有版本,可能在其他 job 运行测试时删除 runtime assets,导致 runtime.htensor.hcache_ops.cpp 等文件偶发缺失。

改动

  • 为整个 vpto-sim-validation job 创建项目内的 .work/ci-sim-venv,而不是仅隔离 PyPTO 安装步骤。
  • 使用显式的 CI_SIM_BASE_PYTHON_BIN;默认指向当前 runner 池的 torchnpu310,并允许通过 repository variable 覆盖,不再扫描文件系统寻找 Python。
  • 通过 --system-site-packages 只读复用基础解释器中的 torch/torch_npu 第三方依赖。
  • 统一使用该 venv 构建、安装和运行 PTOAS、PyPTO、simpler、TileLang DSL、PTODSL 和 VPTO simulator 测试。
  • 设置 PIP_REQUIRE_VIRTUALENV=true,防止后续步骤误写共享 Python 环境。
  • 按统一 Python ABI 复用一套 LLVM 缓存,并删除原先独立的 PTODSL venv、第二套 LLVM 构建和第二次 PTOAS wheel 构建。
  • 安装后检查 PTOAS、PyPTO、simpler distribution 均位于 job-local venv,并验证 simulator 所需的 simpler runtime assets 完整存在。

验证

  • git diff --check
  • YAML 解析成功
  • vpto-sim-validation 的 30 个 shell step 全部通过 bash -n
  • 本机使用配置的 Python 3.10 基础环境创建同样的 --system-site-packages venv,成功导入 torch 2.10.0+cputorch_npu 2.10.0

完整 simulator 回归交由本 PR 的 ci-sim workflow 验证。

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant