-
Yichen Yan authored
This PR adds instructions to specify linker via cmake env `CMAKE_LINKER_TYPE` and also adds `mold` as a linker alternative. Since 3.29, cmake introduced [`CMAKE_LINKER_TYPE`](https://cmake.org/cmake/help/latest/variable/CMAKE_LINKER_TYPE.html) that can specify linker without overwriting `ld` file or changing build script. `mold` is already stable and **the fastest** (afaict) linker out there, and also easier to install compared with `lld`. So I added it here. After switching to `mold`, the time of linking `libtorch_cuda.so` has been reduced from ~7s to ~0.6s locally. Also note `gold` has been marked deprecated recently[1]. [1] https://lwn.net/Articles/1007541/ Pull Request resolved: https://github.com/pytorch/pytorch/pull/146750 Approved by: https://github.com/albanD
06f8f9a0
After you've reviewed these contribution guidelines, you'll be all set to
contribute to this project.
Loading