Commit d91c85b
[c10d][fr] Split cuda and non-cuda fr logic into two cpp file (pytorch#154929)
During the integration fr with gloo I found that put all logic inside one cpp with both build Macro does not work in the current linkage set up in the bazil file. If we put the cpp in the libtorch_cpu, then cuda side build will fail, if we put both we get complaint about ld.lld: error: duplicate symbol: typeinfo for c10d::DebugInfoWriter. To fix this, we need to move the common logic into another header file and we use different cpp file for cpu and cuda so that fr can be used in both cases.
Pull Request resolved: pytorch#154929
Approved by: https://github.com/kwen25011 parent 13044b2 commit d91c85b
File tree
4 files changed
+674
-663
lines changed- torch/csrc/distributed/c10d
4 files changed
+674
-663
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
| 500 | + | |
500 | 501 | | |
501 | 502 | | |
502 | 503 | | |
| |||
696 | 697 | | |
697 | 698 | | |
698 | 699 | | |
699 | | - | |
| 700 | + | |
700 | 701 | | |
701 | 702 | | |
702 | 703 | | |
| |||
0 commit comments