Expose per-backend availability in C++ and python

This commit is contained in:
Angelos Katharopoulos
2025-11-20 15:26:59 -08:00
parent 7a82455b35
commit df6b23156f
4 changed files with 42 additions and 6 deletions

View File

@@ -1088,7 +1088,7 @@ std::shared_ptr<GroupImpl> init(bool strict /* = false */) {
const char* rank_str = std::getenv("MLX_RANK");
const char* ring_verbose = std::getenv("MLX_IBV_VERBOSE");
if (!dev_file || !coordinator || !rank_str) {
if (!is_available() || !dev_file || !coordinator || !rank_str) {
if (strict) {
std::ostringstream msg;
msg << "[ibv] You need to provide via environment variables a rank (MLX_RANK), "