mirror of
https://github.com/microsoft/mscclpp.git
synced 2026-05-11 17:00:22 +00:00
GDRCopy status message to string (#793)
This commit is contained in:
@@ -48,7 +48,7 @@ GdrStatus gdrStatus() { return gdrContext()->status(); }
|
||||
|
||||
bool gdrEnabled() { return gdrStatus() == GdrStatus::Ok; }
|
||||
|
||||
const char* gdrStatusMessage() {
|
||||
std::string gdrStatusMessage() {
|
||||
switch (gdrStatus()) {
|
||||
case GdrStatus::Ok:
|
||||
return "GDRCopy initialized successfully";
|
||||
@@ -181,7 +181,7 @@ GdrStatus gdrStatus() { return GdrStatus::NotBuilt; }
|
||||
|
||||
bool gdrEnabled() { return false; }
|
||||
|
||||
const char* gdrStatusMessage() { return "mscclpp was not built with GDRCopy support (MSCCLPP_USE_GDRCOPY not set)"; }
|
||||
std::string gdrStatusMessage() { return "mscclpp was not built with GDRCopy support (MSCCLPP_USE_GDRCOPY not set)"; }
|
||||
|
||||
// GdrMap::Impl — stub (no GDRCopy)
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace mscclpp {
|
||||
|
||||
@@ -25,7 +26,7 @@ GdrStatus gdrStatus();
|
||||
bool gdrEnabled();
|
||||
|
||||
/// Return a human-readable error message for the current GDRCopy status.
|
||||
const char* gdrStatusMessage();
|
||||
std::string gdrStatusMessage();
|
||||
|
||||
/// RAII wrapper for a GDRCopy BAR1 mapping of a GPU address.
|
||||
/// When GDRCopy is not available, all operations are no-ops and valid() returns false.
|
||||
|
||||
Reference in New Issue
Block a user