Revert "[Submodule] Remove deprecated USE_TBB option and TBB submodule (#127051)"

This reverts commit 699db7988d84d163ebb6919f78885e4630182a7a.

Reverted https://github.com/pytorch/pytorch/pull/127051 on behalf of https://github.com/PaliC due to This PR needs to be synced using the import button as there is a bug in our diff train ([comment](https://github.com/pytorch/pytorch/pull/127051#issuecomment-2138496995))
This commit is contained in:
PyTorch MergeBot
2024-05-30 01:16:57 +00:00
parent 1abcac9dab
commit 67739d8c6f
34 changed files with 863 additions and 19 deletions

View File

@ -1880,6 +1880,9 @@ def _prepare_ldflags(extra_ldflags, with_cuda, verbose, is_standalone):
if not is_standalone:
extra_ldflags.append('-ltorch_python')
if is_standalone and "TBB" in torch.__config__.parallel_info():
extra_ldflags.append('-ltbb')
if is_standalone:
extra_ldflags.append(f"-Wl,-rpath,{TORCH_LIB_PATH}")