File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,13 @@ def can_link_svml():
79
79
and "linux" in platform
80
80
and sys .maxsize > 2 ** 31 )
81
81
82
+ def can_link_svml_fp16 ():
83
+ """SVML FP16 requires binutils >= 2.38 for an updated assembler
84
+ """
85
+ if can_link_svml ():
86
+ binutils_ver = os .popen ("ld -v" ).readlines ()[0 ].strip ()[- 4 :]
87
+ return float (binutils_ver ) >= 2.38
88
+
82
89
def check_git_submodules ():
83
90
out = os .popen ("git submodule status" )
84
91
modules = out .readlines ()
@@ -1009,6 +1016,8 @@ def generate_umath_doc_header(ext, build_dir):
1009
1016
# The ordering of names returned by glob is undefined, so we sort
1010
1017
# to make builds reproducible.
1011
1018
svml_objs .sort ()
1019
+ if not can_link_svml_fp16 ():
1020
+ svml_objs = [o for o in svml_objs if not o .endswith ('_h_la.s' )]
1012
1021
1013
1022
config .add_extension ('_multiarray_umath' ,
1014
1023
sources = multiarray_src + umath_src +
You can’t perform that action at this time.
0 commit comments