Commit 102f4a30 authored by zhanggzh's avatar zhanggzh
Browse files

Update setup.py

parent 05c6bc89
...@@ -39,6 +39,18 @@ if found_swigfaiss_avx2: ...@@ -39,6 +39,18 @@ if found_swigfaiss_avx2:
print(f"Copying {swigfaiss_avx2_lib}") print(f"Copying {swigfaiss_avx2_lib}")
shutil.copyfile("swigfaiss_avx2.py", "faiss/swigfaiss_avx2.py") shutil.copyfile("swigfaiss_avx2.py", "faiss/swigfaiss_avx2.py")
shutil.copyfile(swigfaiss_avx2_lib, f"faiss/_swigfaiss_avx2{ext}") 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:
content = file.read().strip()
dtk_version = content.replace('.', '')
print(dtk_version)
cwd = os.path.dirname(os.path.abspath(__file__))
ver_path = os.path.join(cwd, "faiss", "__init__.py")
with open(ver_path, 'w') as f:
f.write("__version__ = '1.7.2'\n")
version = '1.7.2' + '+das.dtk' + dtk_version
f.write(f"__dcu_version__ = '{version}'\n")
long_description=""" long_description="""
Faiss is a library for efficient similarity search and clustering of dense Faiss is a library for efficient similarity search and clustering of dense
...@@ -50,7 +62,7 @@ are implemented on the GPU. It is developed by Facebook AI Research. ...@@ -50,7 +62,7 @@ are implemented on the GPU. It is developed by Facebook AI Research.
""" """
setup( setup(
name='faiss', name='faiss',
version='1.7.2-dtk22.10-gitb7348e7df780', version='1.7.2' + "+das.dtk" + dtk_version,
description='A library for efficient similarity search and clustering of dense vectors', description='A library for efficient similarity search and clustering of dense vectors',
long_description=long_description, long_description=long_description,
url='https://github.com/facebookresearch/faiss', url='https://github.com/facebookresearch/faiss',
......
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