Commit 87c728c4 authored by huchen's avatar huchen
Browse files

add c++14 support for rocrim

parent 929b785b
......@@ -23,6 +23,9 @@ option(FAISS_ENABLE_GPU "Enable support for GPU indexes." ON)
option(FAISS_ENABLE_PYTHON "Build Python extension." ON)
option(FAISS_ENABLE_C_API "Build C API." OFF)
set(CMAKE_CXX_FLAGS "-std=c++14")
set(CMAKE_CXX_STANDARD "14")
# HC
if(FAISS_ENABLE_GPU)
set(CMAKE_CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER})
......
source /opt/dtk-22.10/env.sh
source /opt/dtk/env.sh
cd /opt/dtk-22.10/.hip/
cd /opt/dtk/.hip/
./remove_origin.sh
cd -
......@@ -13,6 +13,7 @@ export CPLUS_INCLUDE_PATH=${ROCM_PATH}/hiprand/include/:${ROCM_PATH}/rocrand/inc
export LD_LIBRARY_PATH=${ROCM_PATH}/hipblas/lib/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${ROCM_PATH}/llvm/lib:$LD_LIBRARY_PATH
#alias python='python3'
export BUILD_DIR=`pwd`
......@@ -29,11 +30,11 @@ make -j32 install VERBOSE=1 > hc_install.log 2>&1
#make -j32 test VERBOSE=1 > hc_test.log 2>&1
cd -
./test_gpu.sh
#./test_gpu.sh
cd build/faiss/python
#python3 setup.py -v bdist_wheel
pip3 install dist/faiss-1.7.2-py3-none-any.whl --no-deps --force
python3 setup.py -v bdist_wheel
pip3 install dist/* --no-deps --force
cd -
./test_gpu_python.sh
......@@ -180,7 +180,7 @@ endforeach()
find_package(HIP)
#target_link_libraries(faiss)
#target_link_libraries(faiss_avx2)
target_link_libraries(faiss PRIVATE /opt/dtk/hipblas/lib/libhipblas.so.0)
target_link_libraries(faiss_avx2 PRIVATE /opt/dtk/hipblas/lib/libhipblas.so.0)
target_link_libraries(faiss PRIVATE /opt/dtk/hipblas/lib/libhipblas.so)
target_link_libraries(faiss_avx2 PRIVATE /opt/dtk/hipblas/lib/libhipblas.so)
target_compile_options(faiss PRIVATE --gpu-max-threads-per-block=1024)
target_compile_options(faiss_avx2 PRIVATE --gpu-max-threads-per-block=1024)
......@@ -50,7 +50,7 @@ are implemented on the GPU. It is developed by Facebook AI Research.
"""
setup(
name='faiss',
version='1.7.2-dtk22.10-git38a3ad54c7',
version='1.7.2-dtk22.10-git929b785bbb9',
description='A library for efficient similarity search and clustering of dense vectors',
long_description=long_description,
url='https://github.com/facebookresearch/faiss',
......
source /opt/dtk/env.sh
cd /opt/dtk/.hip/
./replace_origin.sh
cd -
#cd /opt/dtk/.hip/
#./replace_origin.sh
#cd -
cd build;
export CPLUS_INCLUDE_PATH=${ROCM_PATH}/include:${ROCM_PATH}:/opencl/include
......
source /opt/dtk/env.sh
cd /opt/dtk/.hip/
./replace_origin.sh
cd -
#cd /opt/dtk/.hip/
#./replace_origin.sh
#cd -
export CPLUS_INCLUDE_PATH=${ROCM_PATH}/include:${ROCM_PATH}:/opencl/include
export LD_LIBRARY_PATH=/public/software/compiler/intel-compiler-2017.5.239/mkl/lib/intel64_lin/:$LD_LIBRARY_PATH
......@@ -21,6 +20,7 @@ export LD_LIBRARY_PATH=${BUILD_DIR}/faiss/gpu/test/:${BUILD_DIR}faiss/:${BUILD_D
#make -j95 VERBOSE=1
export HIP_VISIBLE_DEVICES=3
pip3 install scipy -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
#export AMD_LOG_LEVEL=4
#export AMD_OCL_WAIT_COMMAND=1
......
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