Skip to content

Commit e761b41

Browse files
pgblinkov
authored andcommitted
refactor out new plugin
commit_hash:9e7d09577713ceb4c1bfabf9b70a494f8d0c3532
1 parent c960b5e commit e761b41

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

build/scripts/link_dyn_lib.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -187,17 +187,6 @@ def fix_cmd_for_dynamic_cuda(cmd):
187187
return flags
188188

189189

190-
def fix_blas_resolving(cmd):
191-
# Intel mkl comes as a precompiled static library and thus can not be recompiled with sanitizer runtime instrumentation.
192-
# That's why we prefer to use cblas instead of Intel mkl as a drop-in replacement under sanitizers.
193-
# But if the library has dependencies on mkl and cblas simultaneously, it will get a linking error.
194-
# Hence we assume that it's probably compiling without sanitizers and we can easily remove cblas to prevent multiple definitions of the same symbol at link time.
195-
for arg in cmd:
196-
if arg.startswith('contrib/libs') and arg.endswith('mkl-lp64.a'):
197-
return [arg for arg in cmd if not arg.endswith('libcontrib-libs-cblas.a')]
198-
return cmd
199-
200-
201190
def parse_args(args):
202191
parser = optparse.OptionParser()
203192
parser.disable_interspersed_args()
@@ -242,7 +231,7 @@ def parse_args(args):
242231
assert opts.arch
243232
assert opts.target
244233

245-
cmd = fix_blas_resolving(args)
234+
cmd = args
246235
cmd = fix_cmd(opts.arch, cmd)
247236

248237
if opts.dynamic_cuda:

build/scripts/link_exe.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -299,17 +299,6 @@ def gen_default_suppressions(inputs, output, source_root):
299299
dst.write('}\n')
300300

301301

302-
def fix_blas_resolving(cmd):
303-
# Intel mkl comes as a precompiled static library and thus can not be recompiled with sanitizer runtime instrumentation.
304-
# That's why we prefer to use cblas instead of Intel mkl as a drop-in replacement under sanitizers.
305-
# But if the library has dependencies on mkl and cblas simultaneously, it will get a linking error.
306-
# Hence we assume that it's probably compiling without sanitizers and we can easily remove cblas to prevent multiple definitions of the same symbol at link time.
307-
for arg in cmd:
308-
if arg.startswith('contrib/libs') and arg.endswith('mkl-lp64.a'):
309-
return [arg for arg in cmd if not arg.endswith('libcontrib-libs-cblas.a')]
310-
return cmd
311-
312-
313302
def parse_args(args):
314303
parser = optparse.OptionParser()
315304
parser.disable_interspersed_args()
@@ -351,7 +340,7 @@ def parse_args(args):
351340
opts, args = parse_args(args)
352341
args = pcf.skip_markers(args)
353342

354-
cmd = fix_blas_resolving(args)
343+
cmd = args
355344
cmd = remove_excessive_flags(cmd)
356345
cmd = fix_sanitize_flag(cmd, opts)
357346

0 commit comments

Comments
 (0)