resolve building errors

This commit is contained in:
Bruce.Lu 2024-08-01 19:00:18 +08:00 committed by yuheng
parent 93f3ed9895
commit 93a6513504
8 changed files with 23 additions and 23 deletions

View File

@ -4,13 +4,13 @@ from torch.utils.cpp_extension import load
_src_path = os.path.dirname(os.path.abspath(__file__)) _src_path = os.path.dirname(os.path.abspath(__file__))
nvcc_flags = [ nvcc_flags = [
'-O3', '-std=c++14', '-O3', '-std=c++17',
'-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__', '-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__', '-allow-unsupported-compiler',
'-use_fast_math' '-use_fast_math'
] ]
if os.name == "posix": if os.name == "posix":
c_flags = ['-O3', '-std=c++14'] c_flags = ['-O3', '-std=c++17']
elif os.name == "nt": elif os.name == "nt":
c_flags = ['/O2', '/std:c++17'] c_flags = ['/O2', '/std:c++17']

View File

@ -5,13 +5,13 @@ from torch.utils.cpp_extension import BuildExtension, CUDAExtension
_src_path = os.path.dirname(os.path.abspath(__file__)) _src_path = os.path.dirname(os.path.abspath(__file__))
nvcc_flags = [ nvcc_flags = [
'-O3', '-std=c++14', '-O3', '-std=c++17',
'-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__', '-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__', '-allow-unsupported-compiler',
'-use_fast_math' '-use_fast_math'
] ]
if os.name == "posix": if os.name == "posix":
c_flags = ['-O3', '-std=c++14'] c_flags = ['-O3', '-std=c++17']
elif os.name == "nt": elif os.name == "nt":
c_flags = ['/O2', '/std:c++17'] c_flags = ['/O2', '/std:c++17']

View File

@ -4,12 +4,12 @@ from torch.utils.cpp_extension import load
_src_path = os.path.dirname(os.path.abspath(__file__)) _src_path = os.path.dirname(os.path.abspath(__file__))
nvcc_flags = [ nvcc_flags = [
'-O3', '-std=c++14', '-O3', '-std=c++17',
'-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__', '-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__',
] ]
if os.name == "posix": if os.name == "posix":
c_flags = ['-O3', '-std=c++14', '-finput-charset=UTF-8'] c_flags = ['-O3', '-std=c++17', '-finput-charset=UTF-8']
elif os.name == "nt": elif os.name == "nt":
c_flags = ['/O2', '/std:c++17', '/finput-charset=UTF-8'] c_flags = ['/O2', '/std:c++17', '/finput-charset=UTF-8']

View File

@ -5,12 +5,12 @@ from torch.utils.cpp_extension import BuildExtension, CUDAExtension
_src_path = os.path.dirname(os.path.abspath(__file__)) _src_path = os.path.dirname(os.path.abspath(__file__))
nvcc_flags = [ nvcc_flags = [
'-O3', '-std=c++14', '-O3', '-std=c++17',
'-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__', '-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__','-allow-unsupported-compiler',
] ]
if os.name == "posix": if os.name == "posix":
c_flags = ['-O3', '-std=c++14'] c_flags = ['-O3', '-std=c++17']
elif os.name == "nt": elif os.name == "nt":
c_flags = ['/O2', '/std:c++17'] c_flags = ['/O2', '/std:c++17']

View File

@ -4,12 +4,12 @@ from torch.utils.cpp_extension import load
_src_path = os.path.dirname(os.path.abspath(__file__)) _src_path = os.path.dirname(os.path.abspath(__file__))
nvcc_flags = [ nvcc_flags = [
'-O3', '-std=c++14', '-O3', '-std=c++17',
'-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__', '-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__','-allow-unsupported-compiler',
] ]
if os.name == "posix": if os.name == "posix":
c_flags = ['-O3', '-std=c++14'] c_flags = ['-O3', '-std=c++17']
elif os.name == "nt": elif os.name == "nt":
c_flags = ['/O2', '/std:c++17'] c_flags = ['/O2', '/std:c++17']

View File

@ -5,13 +5,13 @@ from torch.utils.cpp_extension import BuildExtension, CUDAExtension
_src_path = os.path.dirname(os.path.abspath(__file__)) _src_path = os.path.dirname(os.path.abspath(__file__))
nvcc_flags = [ nvcc_flags = [
'-O3', '-std=c++14', '-O3', '-std=c++17',
# '-lineinfo', # to debug illegal memory access # '-lineinfo', # to debug illegal memory access
'-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__', '-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__','-allow-unsupported-compiler',
] ]
if os.name == "posix": if os.name == "posix":
c_flags = ['-O3', '-std=c++14'] c_flags = ['-O3', '-std=c++17']
elif os.name == "nt": elif os.name == "nt":
c_flags = ['/O2', '/std:c++17'] c_flags = ['/O2', '/std:c++17']

View File

@ -4,12 +4,12 @@ from torch.utils.cpp_extension import load
_src_path = os.path.dirname(os.path.abspath(__file__)) _src_path = os.path.dirname(os.path.abspath(__file__))
nvcc_flags = [ nvcc_flags = [
'-O3', '-std=c++14', '-O3', '-std=c++17',
'-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__', '-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__','-allow-unsupported-compiler',
] ]
if os.name == "posix": if os.name == "posix":
c_flags = ['-O3', '-std=c++14', '-finput-charset=utf-8'] c_flags = ['-O3', '-std=c++17', '-finput-charset=utf-8']
elif os.name == "nt": elif os.name == "nt":
c_flags = ['/O2', '/std:c++17', '/source-charset:utf-8'] c_flags = ['/O2', '/std:c++17', '/source-charset:utf-8']

View File

@ -5,12 +5,12 @@ from torch.utils.cpp_extension import BuildExtension, CUDAExtension
_src_path = os.path.dirname(os.path.abspath(__file__)) _src_path = os.path.dirname(os.path.abspath(__file__))
nvcc_flags = [ nvcc_flags = [
'-O3', '-std=c++14', '-O3', '-std=c++17',
'-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__', '-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__','-allow-unsupported-compiler',
] ]
if os.name == "posix": if os.name == "posix":
c_flags = ['-O3', '-std=c++14'] c_flags = ['-O3', '-std=c++17']
elif os.name == "nt": elif os.name == "nt":
c_flags = ['/O2', '/std:c++17'] c_flags = ['/O2', '/std:c++17']