Skip to content

Commit

Permalink
solving error: C++17 or later compatible compiler is required to use …
Browse files Browse the repository at this point in the history
…PyTorch
  • Loading branch information
Wenri committed Nov 23, 2023
1 parent 4cc3c4b commit e27477e
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions ffmlp/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
_src_path = os.path.dirname(os.path.abspath(__file__))

nvcc_flags = [
'-O3', '-std=c++14',
'-O3', '-std=c++17',
'--expt-extended-lambda', '--expt-relaxed-constexpr',
'-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__',
]

if os.name == "posix":
nvcc_flags += ['-Xcompiler=-mf16c', '-Xcompiler=-Wno-float-conversion', '-Xcompiler=-fno-strict-aliasing']
c_flags = ['-O3', '-std=c++14']
c_flags = ['-O3', '-std=c++17']
elif os.name == "nt":
c_flags = ['/O2', '/std:c++17']

Expand Down
4 changes: 2 additions & 2 deletions ffmlp/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
_src_path = os.path.dirname(os.path.abspath(__file__))

nvcc_flags = [
'-O3', '-std=c++14',
'-O3', '-std=c++17',
'--expt-extended-lambda', '--expt-relaxed-constexpr',
'-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__',
]

if os.name == "posix":
nvcc_flags += ['-Xcompiler=-mf16c', '-Xcompiler=-Wno-float-conversion', '-Xcompiler=-fno-strict-aliasing']
c_flags = ['-O3', '-std=c++14']
c_flags = ['-O3', '-std=c++17']
elif os.name == "nt":
c_flags = ['/O2', '/std:c++17']

Expand Down
4 changes: 2 additions & 2 deletions gridencoder/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
_src_path = os.path.dirname(os.path.abspath(__file__))

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__',
]

if os.name == "posix":
c_flags = ['-O3', '-std=c++14']
c_flags = ['-O3', '-std=c++17']
elif os.name == "nt":
c_flags = ['/O2', '/std:c++17']

Expand Down
4 changes: 2 additions & 2 deletions gridencoder/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
_src_path = os.path.dirname(os.path.abspath(__file__))

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__',
]

if os.name == "posix":
c_flags = ['-O3', '-std=c++14']
c_flags = ['-O3', '-std=c++17']
elif os.name == "nt":
c_flags = ['/O2', '/std:c++17']

Expand Down
4 changes: 2 additions & 2 deletions raymarching/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
_src_path = os.path.dirname(os.path.abspath(__file__))

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__',
]

if os.name == "posix":
c_flags = ['-O3', '-std=c++14']
c_flags = ['-O3', '-std=c++17']
elif os.name == "nt":
c_flags = ['/O2', '/std:c++17']

Expand Down
4 changes: 2 additions & 2 deletions raymarching/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
_src_path = os.path.dirname(os.path.abspath(__file__))

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__',
]

if os.name == "posix":
c_flags = ['-O3', '-std=c++14']
c_flags = ['-O3', '-std=c++17']
elif os.name == "nt":
c_flags = ['/O2', '/std:c++17']

Expand Down
4 changes: 2 additions & 2 deletions shencoder/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
_src_path = os.path.dirname(os.path.abspath(__file__))

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__',
]

if os.name == "posix":
c_flags = ['-O3', '-std=c++14']
c_flags = ['-O3', '-std=c++17']
elif os.name == "nt":
c_flags = ['/O2', '/std:c++17']

Expand Down
4 changes: 2 additions & 2 deletions shencoder/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
_src_path = os.path.dirname(os.path.abspath(__file__))

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__',
]

if os.name == "posix":
c_flags = ['-O3', '-std=c++14']
c_flags = ['-O3', '-std=c++17']
elif os.name == "nt":
c_flags = ['/O2', '/std:c++17']

Expand Down

0 comments on commit e27477e

Please sign in to comment.