Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding environment variable to allow skip NUMA node check #505

Merged
merged 3 commits into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions cpp/mrc/src/internal/system/partitions.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -32,8 +32,8 @@
#include <hwloc.h>

#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <cstdlib> // for getenv, size_t
#include <map>
#include <memory>
#include <ostream>
Expand Down Expand Up @@ -80,7 +80,18 @@
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
Loading