[SymmMem] Move code to where it is used#157611
[SymmMem] Move code to where it is used#157611kwen2501 wants to merge 4 commits intogh/kwen2501/191/basefrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/157611
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 30 PendingAs of commit b281ab8 with merge base a6fab82 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| // Print version | ||
| int major, minor; | ||
| ::nvshmem_info_get_version(&major, &minor); | ||
| LOG(INFO) << "NVSHMEM is available, version: " << major << "." << minor; |
There was a problem hiding this comment.
| LOG(INFO) << "NVSHMEM is available, version: " << major << "." << minor; | |
| LOG(INFO) << "NVSHMEM is available, version: " << major << '.' << minor; |
| int result = (stmt); \ | ||
| TORCH_CHECK( \ | ||
| result == 0, \ | ||
| std::string(__FILE__) + ":" + std::to_string(__LINE__) + " " + msg + \ |
There was a problem hiding this comment.
Hmm, this string is always constructed whether the torch check fails or passes... Reformulate to c10::LazyStr or atleast fmtlib.
`maybe_initialize_env_vars` and `initialize_nvshmem_with_store` are only used in `NVSHMEMSymmetricMemory.cu`. Moving them there. cc H-Huang awgu wanchaol fegin fduwjj wz337 wconstab d4l3k [ghstack-poisoned]
|
@pytorchbot merge -f "CI passed; minor format change" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Stack from ghstack (oldest at bottom):
maybe_initialize_env_varsandinitialize_nvshmem_with_storeare only used inNVSHMEMSymmetricMemory.cu. Moving them there.cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k