[BE] remove sysconfig.get_config_var("LIBDIR") from cuda lib paths (#147409)

Summary: I think the path is not needed anymore. It was added in https://github.com/pytorch/pytorch/pull/126408, but  it has been a while since then. See if CI complains.

Differential Revision: D69573185

See also  https://github.com/pytorch/pytorch/pull/147158

Pull Request resolved: https://github.com/pytorch/pytorch/pull/147409
Approved by: https://github.com/chenyang78
This commit is contained in:
Henry Tsang 2025-02-19 23:04:21 +00:00 committed by PyTorch MergeBot
parent f63db6255f
commit 48203bec63

View File

@ -19,7 +19,6 @@ import shutil
import struct
import subprocess
import sys
import sysconfig
import tempfile
import textwrap
import threading
@ -2791,9 +2790,7 @@ def _cuda_lib_options() -> list[str]:
_set_gpu_runtime_env() # cpp_extension consults the env
from torch.utils import cpp_extension
lpaths = cpp_extension.library_paths(device_type="cuda") + [
sysconfig.get_config_var("LIBDIR")
]
lpaths = cpp_extension.library_paths(device_type="cuda")
extra_ldflags: list[str] = []
if is_linux():
_transform_cuda_paths(lpaths)