From 1f3d3fcc0cad8d5ee1b3efb86039e771c07a92c5 Mon Sep 17 00:00:00 2001 From: xuchuan19 Date: Wed, 23 Jul 2025 15:46:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E4=B8=8D=E5=B8=A6=E6=9E=B6=E6=9E=84=E7=9A=84=E9=A9=B1=E5=8A=A8?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ascend_deployer/library/process_npu.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ascend_deployer/library/process_npu.py b/ascend_deployer/library/process_npu.py index e0981076..673a9794 100644 --- a/ascend_deployer/library/process_npu.py +++ b/ascend_deployer/library/process_npu.py @@ -164,6 +164,10 @@ class NpuInstallation: # Ascend-hdk-310p-npu-driver_23.0.rc3_linux-aarch64.run # Ascend-hdk-310p-npu-firmware_7.0.0.5.242.run driver_file_path = self._find_files(uni_package_path, r"*npu-driver*linux*%s*.run" % arch) + if not driver_file_path: + # try to find patch package + # Ascend-hdk--npu-driver_25.0.rc1_sph001_linux.run + driver_file_path = self._find_files(uni_package_path, r"*npu-driver*linux.run") firmware_file_path = self._find_files(uni_package_path, r"*npu-firmware*.run") self.driver_file_path = driver_file_path or self.driver_file_path self.firmware_file_path = firmware_file_path or self.firmware_file_path @@ -191,6 +195,10 @@ class NpuInstallation: # then like A300-3010-npu-driver_20.2.2_linux-x86_64.run # A300-3000-3010-npu-firmware_1.76.22.10.220.run driver_file_path = self._find_files(package_path, r"*npu-driver*%s.run" % arch) + if not driver_file_path: + # try to find patch package + # Ascend-hdk--npu-driver_25.0.rc1_sph001_linux.run + driver_file_path = self._find_files(uni_package_path, r"*npu-driver*linux.run") firmware_file_path = self._find_files(package_path, r"*npu-firmware*.run") self.driver_file_path = driver_file_path or self.driver_file_path self.firmware_file_path = firmware_file_path or self.firmware_file_path -- Gitee From d5587f72ab2abab32492e103236c6a5ca17cee78 Mon Sep 17 00:00:00 2001 From: xuchuan19 Date: Thu, 24 Jul 2025 09:14:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E4=B8=8D=E5=B8=A6=E6=9E=B6=E6=9E=84=E7=9A=84=E9=A9=B1=E5=8A=A8?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ascend_deployer/jobs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ascend_deployer/jobs.py b/ascend_deployer/jobs.py index 123b9596..6c88e0b5 100644 --- a/ascend_deployer/jobs.py +++ b/ascend_deployer/jobs.py @@ -682,6 +682,9 @@ class ResourcePkg(object): self.arches.add('x86_64') if 'aarch64' in file: self.arches.add('aarch64') + # 适配npu-driver的补丁驱动包不带架构的情况 + if "npu-driver" in file and "aarch64" not in file and "x86-64" not in file: + self.arches = {'x86_64', 'aarch64'} src_file = os.path.join(root, file) if src_file.endswith(suffix) and filter_pkg(src_file, self.need_copy_tags): yield src_file -- Gitee