Skip to content

Commit

Permalink
Adding environment variable to skip NUMA node check
Browse files Browse the repository at this point in the history
  • Loading branch information
mdemoret-nv committed Oct 10, 2024
1 parent cef7f0b commit 7ca14fd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cpp/mrc/src/internal/system/partitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,18 @@ Partitions::Partitions(const Topology& topology, const Options& options)
CHECK_NE(rc, -1);
if (node_set.weight() != 0)
{
CHECK_EQ(node_set.weight(), 1);
if (node_set.weight() != 1)
{
if (std::getenv("MRC_IGNORE_NUMA_CHECK") != nullptr)

Check warning on line 85 in cpp/mrc/src/internal/system/partitions.cpp

View check run for this annotation

Codecov / codecov/patch

cpp/mrc/src/internal/system/partitions.cpp#L85

Added line #L85 was not covered by tests
{
LOG(WARNING) << "warning: gpu_id: " << gpu_id << " is not associated with exactly 1 numa node";

Check warning on line 87 in cpp/mrc/src/internal/system/partitions.cpp

View check run for this annotation

Codecov / codecov/patch

cpp/mrc/src/internal/system/partitions.cpp#L87

Added line #L87 was not covered by tests
}
else
{
LOG(FATAL) << "fatal: gpu_id: " << gpu_id << " is not associated with exactly 1 numa node";

Check warning on line 91 in cpp/mrc/src/internal/system/partitions.cpp

View check run for this annotation

Codecov / codecov/patch

cpp/mrc/src/internal/system/partitions.cpp#L91

Added line #L91 was not covered by tests
}
}

gpus_per_numa_node.insert(node_set, gpu_id);
}
}
Expand Down

0 comments on commit 7ca14fd

Please sign in to comment.