未验证 提交 4a5de144 编写于 作者: G Guo Sheng 提交者: GitHub

Remove cusolver potrfBatched support on Windows. (#24338)

test=develop
test=win_gpu
上级 fed22045
......@@ -67,7 +67,7 @@ class CholeskyGPUKernel : public framework::OpKernel<T> {
auto info = memory::Alloc(dev_ctx, sizeof(int) * batch_count);
auto* info_ptr = reinterpret_cast<int*>(info->ptr());
#if CUDA_VERSION >= 9020
#if CUDA_VERSION >= 9020 && !defined(_WIN32)
if (batch_count > 1) {
std::vector<T*> output_ptrs;
for (int i = 0; i < batch_count; i++) {
......@@ -93,7 +93,7 @@ class CholeskyGPUKernel : public framework::OpKernel<T> {
Potrf(dev_ctx, uplo, m, out_data + i * m * m, m, info_ptr + i);
}
#if CUDA_VERSION >= 9020
#if CUDA_VERSION >= 9020 && !defined(_WIN32)
}
#endif
}
......@@ -126,7 +126,7 @@ class CholeskyGPUKernel : public framework::OpKernel<T> {
FUNC_WITH_TYPES(POTRF_INSTANCE);
#if CUDA_VERSION >= 9020
#if CUDA_VERSION >= 9020 && !defined(_WIN32)
#define POTRF_BATCH_INSTANCE(T, C) \
template <> \
void CholeskyGPUKernel<T>::PotrfBatched( \
......
......@@ -230,10 +230,7 @@ void* GetCusolverDsoHandle() {
#if defined(__APPLE__) || defined(__OSX__)
return GetDsoHandleFromSearchPath(FLAGS_cuda_dir, "libcusolver.dylib");
#elif defined(_WIN32) && defined(PADDLE_WITH_CUDA)
// TODO(guosheng): Fix cusolver support on windows.
// return GetDsoHandleFromSearchPath(FLAGS_cuda_dir, win_cusolver_lib);
PADDLE_THROW(platform::errors::Unavailable(
"Cusolver loader cannot support Windows temporarily."));
return GetDsoHandleFromSearchPath(FLAGS_cuda_dir, win_cusolver_lib);
#else
return GetDsoHandleFromSearchPath(FLAGS_cuda_dir, "libcusolver.so");
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册