mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 08:21:53 +08:00
[Iluvatar GPU] fix ci error caused by rebuild_padding param and cuda graph (#4504)
This commit is contained in:
@@ -20,6 +20,8 @@ from dataclasses import dataclass
|
||||
import paddle
|
||||
import pynvml
|
||||
|
||||
from fastdeploy.platforms import current_platform
|
||||
|
||||
|
||||
@dataclass
|
||||
class PaddleMemoryInfo:
|
||||
@@ -46,8 +48,11 @@ class GPUMemoryChecker:
|
||||
self.device_id = device_id
|
||||
self.print_debug_info = print_debug_info
|
||||
|
||||
pynvml.nvmlInit()
|
||||
self.gpu_memory_handle = pynvml.nvmlDeviceGetHandleByIndex(self.device_id)
|
||||
if current_platform.is_iluvatar():
|
||||
self.gpu_memory_handle = None
|
||||
else:
|
||||
pynvml.nvmlInit()
|
||||
self.gpu_memory_handle = pynvml.nvmlDeviceGetHandleByIndex(self.device_id)
|
||||
|
||||
def __del__(self):
|
||||
""" """
|
||||
|
||||
Reference in New Issue
Block a user