From 11ef36d908415141c1b2bed06c286ecdca17f9f3 Mon Sep 17 00:00:00 2001 From: pg Date: Wed, 19 Feb 2025 08:15:22 +0300 Subject: [PATCH] refactor out new plugin commit_hash:9e7d09577713ceb4c1bfabf9b70a494f8d0c3532 --- build/scripts/link_dyn_lib.py | 13 +------------ build/scripts/link_exe.py | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/build/scripts/link_dyn_lib.py b/build/scripts/link_dyn_lib.py index 650f198f..d889ae27 100644 --- a/build/scripts/link_dyn_lib.py +++ b/build/scripts/link_dyn_lib.py @@ -187,17 +187,6 @@ def fix_cmd_for_dynamic_cuda(cmd): return flags -def fix_blas_resolving(cmd): - # Intel mkl comes as a precompiled static library and thus can not be recompiled with sanitizer runtime instrumentation. - # That's why we prefer to use cblas instead of Intel mkl as a drop-in replacement under sanitizers. - # But if the library has dependencies on mkl and cblas simultaneously, it will get a linking error. - # 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. - for arg in cmd: - if arg.startswith('contrib/libs') and arg.endswith('mkl-lp64.a'): - return [arg for arg in cmd if not arg.endswith('libcontrib-libs-cblas.a')] - return cmd - - def parse_args(args): parser = optparse.OptionParser() parser.disable_interspersed_args() @@ -242,7 +231,7 @@ def parse_args(args): assert opts.arch assert opts.target - cmd = fix_blas_resolving(args) + cmd = args cmd = fix_cmd(opts.arch, cmd) if opts.dynamic_cuda: diff --git a/build/scripts/link_exe.py b/build/scripts/link_exe.py index e48ecb49..400c5fd3 100644 --- a/build/scripts/link_exe.py +++ b/build/scripts/link_exe.py @@ -299,17 +299,6 @@ def gen_default_suppressions(inputs, output, source_root): dst.write('}\n') -def fix_blas_resolving(cmd): - # Intel mkl comes as a precompiled static library and thus can not be recompiled with sanitizer runtime instrumentation. - # That's why we prefer to use cblas instead of Intel mkl as a drop-in replacement under sanitizers. - # But if the library has dependencies on mkl and cblas simultaneously, it will get a linking error. - # 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. - for arg in cmd: - if arg.startswith('contrib/libs') and arg.endswith('mkl-lp64.a'): - return [arg for arg in cmd if not arg.endswith('libcontrib-libs-cblas.a')] - return cmd - - def parse_args(args): parser = optparse.OptionParser() parser.disable_interspersed_args() @@ -351,7 +340,7 @@ def parse_args(args): opts, args = parse_args(args) args = pcf.skip_markers(args) - cmd = fix_blas_resolving(args) + cmd = args cmd = remove_excessive_flags(cmd) cmd = fix_sanitize_flag(cmd, opts)