跳到主內容
版本:3.0

人工智慧加速器(GPU)

AI 加速器 (GPU) 功能可將實體 GPU 裝置直接傳遞至虛擬機器,為人工智慧與機器學習工作負載提供高效能運算能力。

透過 CubeCOS GPU 直通技術使用GPU運算

透過 CubeCOS 對 GPU 裝置直通的強大支援,充分發揮 AI 加速器的潛能。 此功能專為滿足現代人工智慧與機器學習工作負載的嚴苛需求而設計,使企業能夠在虛擬機器內直接調用專用GPU的原始運算能力,確保無與倫比的效能、效率與靈活性。

透過終端機或Putty連線至命令列介面

$ ssh admin@<your-cluster-vip>
Warning: Permanently added '192.168.X.X' (ECDSA) to the list of known hosts.
Password:
Welcome to the Cube Appliance
Enter "help" for a list of available commands
controller>

建立裝置設定

controller:gpu> device_profile_create
Creating device profile for NVIDIA Corporation GA106 [RTX A2000] (resource unit: 1)
+-------------+------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------+------------------------------------------------------------------------------------------------------------------+
| created_at | 2024-07-18 02:34:24+00:00 |
| updated_at | None |
| uuid | bbe5ea28-deed-4131-9579-7fd9b06de9b4 |
| name | rtx_a2000_1 |
| groups | [{'resources:PGPU': '1', 'trait:CUSTOM_GPU_PRODUCT_ID_2531': 'required', 'trait:CUSTOM_GPU_NVIDIA': 'required'}] |
| description | None |
+-------------+------------------------------------------------------------------------------------------------------------------+

檢查狀態

controller:gpu> status
+-----------+
| Node View |
+-----------+---------------------------------------

IOMMU: on

GPU IOMMU Group List
IOMMU Group 14: 18:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106 [RTX A2000] [10de:2531] (rev a1) (driver: nvidia)
IOMMU Group 14: 18:00.1 Audio device [0403]: NVIDIA Corporation GA106 High Definition Audio Controller [10de:228e] (rev a1) (driver: snd_hda_intel)

Thu Jul 18 10:33:50 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.129.03 Driver Version: 535.129.03 CUDA Version: N/A |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA RTX A2000 On | 00000000:18:00.0 Off | Off |
| 30% 42C P8 14W / 70W | 0MiB / 6138MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
+---------------------------------------------------------------------------------------+

Thu Jul 18 10:33:50 2024
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 535.129.03 Driver Version: 535.129.03 |
|---------------------------------+------------------------------+------------+
| GPU Name | Bus-Id | GPU-Util |
| vGPU ID Name | VM ID VM Name | vGPU-Util |
|=================================+==============================+============|
| 0 NVIDIA RTX A2000 | 00000000:18:00.0 | 0% |
+---------------------------------+------------------------------+------------+

GPU 00000000:18:00.0
Migration capability : No

Virtualization:
No vGPU type configured

Supported vGPU types:

+--------------+
| Cluster View |
+--------------+------------------------------------

Accelerator:
+--------------------------------------+------+--------+----------+-------------------------------------------------------------------+
| uuid | type | vendor | hostname | std_board_info |
+--------------------------------------+------+--------+----------+-------------------------------------------------------------------+
| e24eeaa6-fabd-4262-ae3c-6957b66f5785 | GPU | 10de | cc2 | {"product_id": "2531", "controller": "VGA compatible controller"} |
| 45eeb6b3-02f6-42df-93bd-c278599bc163 | GPU | 10de | cc3 | {"product_id": "2531", "controller": "VGA compatible controller"} |
+--------------------------------------+------+--------+----------+-------------------------------------------------------------------+
GPU Resource Provider:
+--------------------------------------+---------------------+
| uuid | name |
+--------------------------------------+---------------------+
| c419cc67-fbac-3c6c-81c3-cd5188f7a119 | cc2_0000:18:00.0 |
| 00cce127-e7df-3071-99d2-07e62767a049 | cc3_0000:18:00.0 |
+--------------------------------------+---------------------+
Accelerator Request:

Accelerator Device Profile:
+--------------------------------------+-------------+------------------------------------------------------------------------------------------------------------------+-------------+
| uuid | name | groups | description |
+--------------------------------------+-------------+------------------------------------------------------------------------------------------------------------------+-------------+
| bbe5ea28-deed-4131-9579-7fd9b06de9b4 | rtx_a2000_1 | [{'resources:PGPU': '1', 'trait:CUSTOM_GPU_PRODUCT_ID_2531': 'required', 'trait:CUSTOM_GPU_NVIDIA': 'required'}] | None |
+--------------------------------------+-------------+------------------------------------------------------------------------------------------------------------------+-------------+

停用裝置虛擬功能已啟用裝置直通

cc2:gpu> virtual_function_disable
set device 10de:2531 at 0000:18:00.0 driver to vfio-pci
set device 10de:228e at 0000:18:00.1 driver to vfio-pci

GPU IOMMU Group List
IOMMU Group 14: 18:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106 [RTX A2000] [10de:2531] (rev a1) (driver: pcieport)
IOMMU Group 14: 18:00.1 Audio device [0403]: NVIDIA Corporation GA106 High Definition Audio Controller [10de:228e] (rev a1) (driver: pcieport)

額外設定