Commit e5523e7
committed
Link statically
Pull Request resolved: #2085
Link everything into monarch statically, or dlopen it.
This makes the rdma related libraries and libc++ linked statically for increased portability. This means monarch built with rdma support and with a different version of libc++ than the current system can still be used.
By building rdma-core from source, we can also make sure Dennis' 64-bit patch is applied.
Total size of our so is 63MB now with no uncommon deps:
```
(monarch) [zdevito@devgpu014 /data/users/zdevito/fbsource/fbcode/monarch]$ ldd ./python/monarch/_rust_bindings.so
linux-vdso.so.1 (0x00007f347a684000)
libpython3.11.so.1.0 => /home/zdevito/local/miniconda3/envs/monarch/lib/libpython3.11.so.1.0 (0x00007f3477200000)
libgcc_s.so.1 => /home/zdevito/local/miniconda3/envs/monarch/lib/libgcc_s.so.1 (0x00007f347a664000)
libm.so.6 => /lib64/libm.so.6 (0x00007f3477125000)
libc.so.6 => /lib64/libc.so.6 (0x00007f3476e00000)
/lib64/ld-linux-x86-64.so.2 (0x00007f347a686000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f347a64a000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f347a645000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f347a640000)
(monarch) [zdevito@devgpu014 /data/users/zdevito/fbsource/fbcode/monarch]$ du -h ./python/monarch/_rust_bindings.so
63M ./python/monarch/_rust_bindings.so
```
ghstack-source-id: 328274952
Differential Revision: [D88540873](https://our.internmc.facebook.com/intern/diff/D88540873/)1 parent bca67e4 commit e5523e7
File tree
11 files changed
+441
-32
lines changed- build_utils/src
- monarch_cpp_static_libs
- src
- monarch_extension
- nccl-sys
- rdmaxcel-sys
- torch-sys-cuda
11 files changed
+441
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
279 | 373 | | |
280 | 374 | | |
281 | 375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments