"docs/vscode:/vscode.git/clone" did not exist on "8fe2588b12eafefcd2db469c66bda3fd03594ee1"
Commit ca1a531d authored by zhanggzh's avatar zhanggzh
Browse files

add mkl so file

parent 8102ac0a
Pipeline #1944 canceled with stages
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import print_function
from setuptools import setup, find_packages
import os
......@@ -17,7 +12,13 @@ shutil.copyfile("__init__.py", "faiss/__init__.py")
shutil.copyfile("loader.py", "faiss/loader.py")
shutil.copyfile("libfaiss_python_callbacks.so", "faiss/libfaiss_python_callbacks.so")
shutil.copyfile("../libfaiss.so", "faiss/libfaiss.so")
shutil.copyfile("/opt/intel/compilers_and_libraries_2020.4.304/linux/mkl/lib/intel64_lin/libmkl_rt.so", "faiss/libmkl_rt.so")
# 复制所有的 .so 库到 faiss 目录
intel_mkl_libs_dir = "/opt/intel/compilers_and_libraries_2020.4.304/linux/mkl/lib/intel64_lin"
for file in os.listdir(intel_mkl_libs_dir):
if file.endswith(".so"):
shutil.copyfile(os.path.join(intel_mkl_libs_dir, file), os.path.join("faiss", file))
ext = ".pyd" if platform.system() == 'Windows' else ".so"
prefix = "Release/" * (platform.system() == 'Windows')
......@@ -40,6 +41,7 @@ if found_swigfaiss_avx2:
print(f"Copying {swigfaiss_avx2_lib}")
shutil.copyfile("swigfaiss_avx2.py", "faiss/swigfaiss_avx2.py")
shutil.copyfile(swigfaiss_avx2_lib, f"faiss/_swigfaiss_avx2{ext}")
ROCM_PATH = os.getenv('ROCM_PATH')
dtk_path = ROCM_PATH + '/.info/rocm_version'
with open(dtk_path, 'r') as file:
......@@ -61,6 +63,7 @@ code for evaluation and parameter tuning. Faiss is written in C++ with
complete wrappers for Python/numpy. Some of the most useful algorithms
are implemented on the GPU. It is developed by Facebook AI Research.
"""
setup(
name='faiss',
version='1.7.2' + "+das.dtk" + dtk_version,
......@@ -75,7 +78,7 @@ setup(
install_requires=['numpy'],
packages=['faiss', 'faiss.contrib'],
package_data={
'faiss': ['*.so', '*.pyd'],
'faiss': ['*.so', '*.pyd'], # 包含 .so 和 .pyd 文件
},
zip_safe=False,
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment