@@ -59,20 +59,21 @@ def get_processor_arch_name(cuda_version):
5959 )),
6060)
6161
62-
63- # Why is this an option?
64- # All the nightlies used to be devtoolset3 and built with the old gcc ABI. We
65- # added a devtoolset7 option so that we could build nightlies with the new gcc
66- # ABI. That didn't work since devtoolset7 can't build with the new gcc ABI. But
67- # then we set devtoolset7 to be the default anyways, since devtoolset7
68- # understands avx512, which is needed for good fbgemm performance.
69- # This should be removed. The base dockers should just be upgraded to
70- # devtoolset7 so we don't have to reinstall this in every build job.
71- # The same machinery that this uses, though, should be retooled for a different
72- # compiler toolchain that can build with the new gcc ABI.
73- DEVTOOLSET_VERSIONS = [
74- 7 ,
75- ]
62+ # GCC config variants:
63+ #
64+ # All the nightlies (except libtorch with new gcc ABI) are built with devtoolset7,
65+ # which can only build with old gcc ABI. It is better than devtoolset3
66+ # because it understands avx512, which is needed for good fbgemm performance.
67+ #
68+ # Libtorch with new gcc ABI is built with gcc 5.4 on Ubuntu 16.04.
69+ LINUX_GCC_CONFIG_VARIANTS = OrderedDict (
70+ manywheel = ['devtoolset7' ],
71+ conda = ['devtoolset7' ],
72+ libtorch = [
73+ "devtoolset7" ,
74+ "gcc5.4_cxx11-abi" ,
75+ ],
76+ )
7677
7778
7879class TopLevelNode (ConfigNode ):
@@ -95,13 +96,7 @@ def __init__(self, parent, os_name, cuda_versions, py_tree):
9596 self .props ["cuda_versions" ] = cuda_versions
9697
9798 def get_children (self ):
98- packaging_variants = [PackageFormatConfigNode (self , k , v ) for k , v in self .py_tree .items ()]
99-
100- if self .find_prop ("smoke" ):
101- filtered_packaging_variants = list (filter (lambda x : x .get_label () != "libtorch" , packaging_variants ))
102- return filtered_packaging_variants
103- else :
104- return packaging_variants
99+ return [PackageFormatConfigNode (self , k , v ) for k , v in self .py_tree .items ()]
105100
106101
107102class PackageFormatConfigNode (ConfigNode ):
@@ -113,23 +108,23 @@ def __init__(self, parent, package_format, python_versions):
113108
114109 def get_children (self ):
115110 if self .find_prop ("os_name" ) == "linux" :
116- return [LinuxGccConfigNode (self , v ) for v in DEVTOOLSET_VERSIONS ]
111+ return [LinuxGccConfigNode (self , v ) for v in LINUX_GCC_CONFIG_VARIANTS [ self . find_prop ( "package_format" )] ]
117112 else :
118113 return [ArchConfigNode (self , v ) for v in self .find_prop ("cuda_versions" )]
119114
120115
121116class LinuxGccConfigNode (ConfigNode ):
122- def __init__ (self , parent , devtoolset_version ):
123- super (LinuxGccConfigNode , self ).__init__ (parent , "DEVTOOLSET =" + str (devtoolset_version ))
117+ def __init__ (self , parent , gcc_config_variant ):
118+ super (LinuxGccConfigNode , self ).__init__ (parent , "GCC_CONFIG_VARIANT =" + str (gcc_config_variant ))
124119
125- self .props ["devtoolset_version " ] = devtoolset_version
120+ self .props ["gcc_config_variant " ] = gcc_config_variant
126121
127122 def get_children (self ):
128123 cuda_versions = self .find_prop ("cuda_versions" )
129124
130125 # XXX devtoolset7 on CUDA 9.0 is temporarily disabled
131126 # see https://github.com/pytorch/pytorch/issues/20066
132- if self .find_prop ("devtoolset_version " ) == 7 :
127+ if self .find_prop ("gcc_config_variant " ) == 'devtoolset7' :
133128 cuda_versions = filter (lambda x : x != "90" , cuda_versions )
134129
135130 return [ArchConfigNode (self , v ) for v in cuda_versions ]
0 commit comments