diff --git a/ascend_deployer/jobs.py b/ascend_deployer/jobs.py index 123b95967faba28326e8f40cf41ae9c3f5e09858..6c88e0b515b5204af19efcff4142f21573628b16 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 diff --git a/ascend_deployer/library/process_npu.py b/ascend_deployer/library/process_npu.py index e09810767ea394912002d1e523e7709d2cd429de..673a97947298d249f2c7079b8684426f0376686b 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