From f5051554d868c7f4671f3381ed94e16f1bf2e764 Mon Sep 17 00:00:00 2001 From: zhanhao Date: Tue, 5 Dec 2023 17:08:23 +0800 Subject: [PATCH] fix ci --- utils/extension.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/extension.py b/utils/extension.py index e0460247..28e398ae 100644 --- a/utils/extension.py +++ b/utils/extension.py @@ -15,6 +15,7 @@ import os +import site import setuptools import torch @@ -24,7 +25,8 @@ try: import torch_npu PYTORCH_NPU_INSTALL_PATH = os.path.dirname(os.path.realpath(torch_npu.__file__)) except: - PYTORCH_NPU_INSTALL_PATH = "/opt/_internal/cpython-3.7.5/lib/python3.7/site-packages/torch_npu/" + site_packages_path = site.getsitepackages() + PYTORCH_NPU_INSTALL_PATH = site_packages_path[0] + "/torch_npu/" def NpuExtension(name, sources, *args, **kwargs): -- Gitee