Remove cusolver potrfBatched support on Windows. (#24338)

test=develop
test=win_gpu
revert-24314-dev/fix_err_msg
Guo Sheng 5 years ago committed by GitHub
parent fed2204517
commit 4a5de14426
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save