Skip to content

Commit

Permalink
change extra_compile_flag to -std=c++14: setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kamo-naoyuki committed Apr 26, 2020
1 parent c1a265f commit 5098002
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pytorch_binding/setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
from distutils.version import LooseVersion
import os
import platform
import sys
from setuptools import setup, find_packages
import torch
from torch.utils.cpp_extension import BuildExtension, CppExtension

extra_compile_args = ['-std=c++11', '-fPIC']

extra_compile_args = ['-fPIC']
if LooseVersion(torch.__version__) >= LooseVersion("1.5.0"):
extra_compile_args += ['-std=c++14']
else:
extra_compile_args += ['-std=c++11']
warp_rnnt_path = "../build"

if torch.cuda.is_available() or "CUDA_HOME" in os.environ:
Expand Down

0 comments on commit 5098002

Please sign in to comment.