Merge pull request #38940 from kay0u:patch-1
PiperOrigin-RevId: 312833254 Change-Id: I6b812e7fbf93e536404c296bd0fc2f96b84bff4c
This commit is contained in:
commit
f6e9d0ca52
3
third_party/gpus/check_cuda_libs.py
vendored
3
third_party/gpus/check_cuda_libs.py
vendored
@ -59,7 +59,7 @@ def check_cuda_lib(path, check_soname=True):
|
||||
objdump = which("objdump")
|
||||
if check_soname and objdump is not None and not _is_windows():
|
||||
# Decode is necessary as in py3 the return type changed from str to bytes
|
||||
output = subprocess.check_output([objdump, "-p", path]).decode("ascii")
|
||||
output = subprocess.check_output([objdump, "-p", path]).decode("utf-8")
|
||||
output = [line for line in output.splitlines() if "SONAME" in line]
|
||||
sonames = [line.strip().split(" ")[-1] for line in output]
|
||||
if not any([soname == os.path.basename(path) for soname in sonames]):
|
||||
@ -86,4 +86,3 @@ def main():
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user