Files
mscclpp/test/unit/numa_tests.cc
Changho Hwang 544ff0c21d ROCm support (#213)
Co-authored-by: Binyang Li <binyli@microsoft.com>
2023-11-24 16:41:56 +08:00

21 lines
431 B
C++

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include <gtest/gtest.h>
#include <mscclpp/gpu_utils.hpp>
#include <mscclpp/numa.hpp>
TEST(NumaTest, Basic) {
int num;
MSCCLPP_CUDATHROW(cudaGetDeviceCount(&num));
if (num == 0) {
return;
}
for (int i = 0; i < num; i++) {
int numaNode = mscclpp::getDeviceNumaNode(i);
EXPECT_GE(numaNode, 0);
mscclpp::numaBind(numaNode);
}
}