文件最后提交记录最后更新时间
1 个月前
1 个月前
README

Interface List

DCMI Description

Overview

This document describes the DaVinci Card Management Interfaces (DCMIs). You can use these APIs to perform operations such as device management, configuration management, and chip reset.

This document applies to the Atlas 350 accelerator card.

Deployment Scenario Description

  • If a specific deployment scenario is not mentioned in the command or API description within this document, it indicates that the product does not support that scenario, and no such support is currently planned.

  • In the Support in different deployment scenarios tables in this document, Y means "supported", N means "not supported", and NA means "not applicable", indicating that the scenario is not planned.

  • If a specific deployment scenario is not mentioned in the command or API description within this document, it indicates that the product does not support that scenario, and no such support is currently planned.

  • In the "Support by Deployment Scenario" table in this document, Y means "supported", N means "not supported", and NA means "not applicable", indicating that the scenario is not planned.

Table 1 Deployment Scenario Definitions and Descriptions

Deployment Scenario

Sub-scenario

Description

Physical machine (PM)a

PM (bare metal)

NPUs run directly on PMs (bare metal).

PM + unprivileged container

Passthrough the physical server's NPU device into an unprivileged container for use.

PM + privileged container

Passthrough the physical server's NPU device into a privileged container for use.

Virtual machine (VM)b

VM passthrough

Dedicate an entire physical NPU for exclusive use by a single virtual machine. Supported passthrough modes include: full-system (all NPUs), partial (a subset of NPUs), and single-device (one NPU)

VM passthrough + unprivileged container

Allocate an entire physical NPU to a VM and then pass its resources through to an unprivileged container running inside that VM.

VM passthrough + privileged container

Allocate an entire physical NPU to a VM and then pass its resources through to a privileged container running inside that VM.

Ascend Virtual Instance (AVI)c

Physical machine + container-based AVI

On a PM, the npu-smi tool or DCMI is used to partition the NPU hardware resources into vNPUs based on user-defined requirements. The created vNPUs are then mounted to containers for use.

PM + VM-based AVI

On a PM, the npu-smi tool or DCMI is used to partition the NPU hardware resources into vNPUs based on user-defined requirements. The created vNPUs are then allocated to the VM for use. A single vNPU can be allocated to only one VM, but a single VM can be mounted with multiple vNPUs.

VM + container-based AVI

Partition the NPU hardware resources into vNPUs using the npu-smi tool or DCMI, based on user-defined requirements. Then allocate specified vNPUs to a VM, and mount the vNPUs to containers in the VM for use.

VM passthrough + container-based AVI

Allocate a single physical NPU entirely to a VM. Then, within that VM, the NPU is partitioned into vNPUs using the npu-smi tool or DCMI based on user-defined requirements. Finally, these vNPUs are passed through to containers for use.

a: Operating NPU resources in a PM environment, including two scenarios: PM and PM + container

b: Operating NPU resources in a VM environment, including two scenarios: VM passthrough and VM passthrough + containers

c: Use resource virtualization technology to partition one NPU into several virtual NPUs (vNPUs) for mounting to VMs or containers, allowing one NPU to handle multiple computing tasks simultaneously. AVI implements this through computing power allocation, enabling secure, multi-tenant resource pooling and on-demand management, which greatly reduces costs and complexity.

Usage Precautions

  • DCMIs cannot be concurrently used by multiple threads.
  • You are advised to compile DCMI-related executable files in a matching execution environment. Otherwise, glibc versions may be incompatible. Unless otherwise specified, containers in this document refer to unprivileged containers.
  • Starting from Ascend 950, DCMIs have been reconstructed. The core optimization of the reconstruction is to unify card_id and device_id into dev_id (logical ID of the software) to improve API consistency and usability. The details are as follows:
    1. For Ascend 950, the dcmiv2_xx APIs must be used, and the dcmi_xx APIs are no longer supported.
    2. For generations before Ascend 950, the dcmi_xx APIs are still used without being affected by the reconstruction.

Chip Reset API Description

In-band reset: Resets Ascend AI Processors through the standard PCIe hot reset process. The involved API is dcmiv2_reset_device (channel_type is set to 1).

Note:

Before calling the chip reset API, stop NPU-related services on the chip. NPU-related services can be queried using fuser. For details, see Querying NPU Service Processes. Wait for 3 seconds after calling dcmiv2_reset_device, and then call dcmiv2_rescan_device.