未验证 提交 ab41a9ee 编写于 作者: Z Zhou Wei 提交者: GitHub

fix unittest failure due to the path is too long (#33447)

上级 afa4bf51
......@@ -775,13 +775,13 @@ inline std::string GetExternalErrorMsg(T status) {
}
}
#else
char buf[100];
char buf[512];
MEMORY_BASIC_INFORMATION mbi;
HMODULE h_module =
(::VirtualQuery(GetCurrentTraceBackString, &mbi, sizeof(mbi)) != 0)
? (HMODULE)mbi.AllocationBase
: NULL;
GetModuleFileName(h_module, buf, 100);
GetModuleFileName(h_module, buf, 512);
std::string strModule(buf);
const size_t last_slash_idx = strModule.find_last_of("\\");
std::string compare_path = strModule.substr(strModule.length() - 7);
......
......@@ -417,7 +417,7 @@ TEST(enforce, cuda_success) {
"An unsupported value or parameter was passed to the function (a "
"negative vector size, for example).To correct: ensure that all the "
"parameters being passed have valid values"));
/*
#if !defined(__APPLE__) && defined(PADDLE_WITH_NCCL)
EXPECT_TRUE(CheckCudaStatusSuccess(ncclSuccess));
EXPECT_TRUE(CheckCudaStatusFailure(ncclUnhandledCudaError, "NCCL error"));
......@@ -430,7 +430,6 @@ TEST(enforce, cuda_success) {
"The call to NCCL is incorrect. This is "
"usually reflecting a programming error"));
#endif
*/
}
#endif
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册