Files
mscclpp/test/unit/utils_internal_tests.cc
Changho Hwang 60b3dd5a61 Bug fixes & resolve warnings (#107)
* Fix a bug in host hashing
* Fix a bug in `HostEpoch::wait()`
* Remove misc warnings
2023-06-16 09:31:23 +00:00

18 lines
317 B
C++

#include <gtest/gtest.h>
#include <thread>
#include "utils_internal.hpp"
TEST(UtilsInternalTest, getHostHash) {
uint64_t hash1 = mscclpp::getHostHash();
uint64_t hash2;
std::thread th([&hash2]() { hash2 = mscclpp::getHostHash(); });
ASSERT_TRUE(th.joinable());
th.join();
EXPECT_EQ(hash1, hash2);
}