diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a2f4ff3b..09559a40a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ if(BUILD_PYTHON_MODULE) message(STATUS "Adding Python module") # PyBind11 wrapper source file set(PYTHON_SRC bindings.cc launch.cc) - set_source_files_properties(launch.cc PROPERTIES COMPILE_FLAGS "-std=c++14 -D_GLIBCXX_USE_CXX11_ABI=0") + set_source_files_properties(launch.cc PROPERTIES COMPILE_FLAGS "-std=c++14 -D_GLIBCXX_USE_CXX11_ABI=${TORCH_CXX11_ABI}") include_directories("." ${PYTHON_INCLUDE_DIRS}) link_directories(${PYTHON_LINK_DIRS}) endif() diff --git a/include/triton/ir/module.h b/include/triton/ir/module.h index d85140d39..6db128198 100644 --- a/include/triton/ir/module.h +++ b/include/triton/ir/module.h @@ -8,8 +8,8 @@ #include #include #include -#include "builder.h" -#include "metadata.h" +#include "triton/ir/builder.h" +#include "triton/ir/metadata.h" namespace triton{ diff --git a/python/setup.py b/python/setup.py index c3862aa0d..97fc52957 100644 --- a/python/setup.py +++ b/python/setup.py @@ -62,7 +62,7 @@ class CMakeBuild(build_ext): python_lib_dirs = distutils.sysconfig.get_config_var('LIBDIR') torch_include_dirs = include_paths(True) torch_library_dirs = library_paths(True) - abi = torch._C._GLIBCXX_USE_CXX11_ABI + cxx11abi = str(int(torch._C._GLIBCXX_USE_CXX11_ABI)) cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, '-DBUILD_TESTS=OFF', '-DBUILD_PYTHON_MODULE=ON', @@ -70,6 +70,7 @@ class CMakeBuild(build_ext): #'-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON, '-DPYTHON_INCLUDE_DIRS=' + ';'.join([python_include_dirs] + include_paths(True)), '-DPYTHON_LINK_DIRS=' + ';'.join(library_paths(True)), + '-DTORCH_CXX11_ABI=' + cxx11abi, '-DTORCH_LIBRARIES=c10;c10_cuda;torch;torch_cuda;torch_cpu;torch_python;triton', '-DLLVM_CONFIG=' + find_llvm()] # configuration