Introduce FB_CUDACHECKTHROW_EX_NOCOMM macro for enhanced error reporting #157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
TL;DR: Adds a convenience macro
FB_CUDACHECKTHROW_EX_NOCOMMthat wrapsFB_CUDACHECKTHROW_EXwithstd::nulloptvalues for use in contexts where communicator information (rank, commHash, commDesc) is not available.Detailed Overview
Context & Motivation
As part of MCCL's fault tolerance efforts (T247416168), we are migrating CUDA error handling in CTRAN from
std::runtime_errortoctran::utils::Exception. The previous diff (D90191648) introducedFB_CUDACHECKTHROW_EX, which requires rank, comm hash, and description parameters for enhanced error reporting.However, there are contexts within the codebase where these communicator-specific values are not available (e.g., utility functions, initialization code, or standalone CUDA operations). Requiring callers to manually pass
std::nulloptfor all three parameters in these cases is verbose and error-prone.Reviewed By: arttianezhu
Differential Revision: D90192768