Skip to content

Commit f546575

Browse files
authored
Merge pull request #66 from kamo-naoyuki/pt1.5
Support pytorch1.5
2 parents c1a265f + 5098002 commit f546575

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pytorch_binding/setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
from distutils.version import LooseVersion
12
import os
23
import platform
34
import sys
45
from setuptools import setup, find_packages
56
import torch
67
from torch.utils.cpp_extension import BuildExtension, CppExtension
78

8-
extra_compile_args = ['-std=c++11', '-fPIC']
9+
10+
extra_compile_args = ['-fPIC']
11+
if LooseVersion(torch.__version__) >= LooseVersion("1.5.0"):
12+
extra_compile_args += ['-std=c++14']
13+
else:
14+
extra_compile_args += ['-std=c++11']
915
warp_rnnt_path = "../build"
1016

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

0 commit comments

Comments
 (0)