ascend-mmcv-install

Install mmcv-full with NPU support inside Ascend NPU containers.

31|1|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/Ascend/agent-skills --skill ascend-mmcv-install
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ascend-mmcv-install
Source: https://github.com/Ascend/agent-skills/tree/main/skills/drivingsdk-ascend-model-migration/ascend-mmlab-install-suite/mmcv
Command: npx skills add https://github.com/Ascend/agent-skills --skill ascend-mmcv-install

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

在昇腾NPU容器中为需要 mmcv-full 的 OpenMMLab 库安装提供完整的编译与依赖流程,确保 NPU 算子可用。

Core Features & Use Cases

  • 完整流程:从依赖安装、补丁应用到 mmcv-full 的编译与安装,确保 NPU 支持。
  • 配置与定制:支持指定 Conda 环境、版本分支和补丁策略,适用于 BEVFormer 等 OpenMMLab 项目。
  • Use Case:在需要在 Ascend 设备上运行 OpenMMLab 模型时,准备包含 NPU 运算支持的 mmcv-full。

Quick Start

按照步骤在昇腾NPU容器中完成 mmcv-full 的安装前置、补丁应用与构建。

Frequently Asked Questions about ascend-mmcv-install

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

FAQPage Schema
How do I install mmcv-full with Ascend NPU support in a container?

Installing mmcv-full with Ascend NPU support requires cloning the mmcv repository, applying necessary patches, installing runtime dependencies, and building with MMCV_WITH_OPS=1 and FORCE_NPU=1 flags inside an Ascend NPU container. This automated process ensures NPU operators are fully compiled and available for OpenMMLab libraries like BEVFormer.

What prerequisites are needed to compile mmcv-full for Ascend NPU?

Compiling mmcv-full for Ascend NPU requires Ascend CANN and torch_npu to be pre-installed in the container environment. You also need container access to clone the mmcv repository, apply patches, and install runtime dependencies before building the package with NPU operator support.

When do I need to compile mmcv-full with NPU operators for OpenMMLab?

You need to compile mmcv-full with NPU operators when preparing OpenMMLab-based projects that require hardware acceleration in Ascend environments. This is specifically required for running models like BEVFormer and other OpenMMLab libraries on Ascend NPU hardware.

Can I customize the mmcv-full build for a specific Conda environment?

Yes, you can customize the mmcv-full build by specifying the target Conda environment, selecting specific version branches, and defining patch strategies. This configuration flexibility allows the installation to adapt to various OpenMMLab project requirements within Ascend NPU containers.

Why does mmcv-full fail to build on Ascend NPU without patches?

Building mmcv-full on Ascend NPU without patches fails because the standard source code lacks native NPU operator definitions. Applying the provided patches modifies the codebase to enable FORCE_NPU=1 and ensures proper integration with Ascend CANN and torch_npu during the compilation process.