[BE] Fix '_WIN32' is not defined warning (#162516)

Summary: As indeed it is not defined neither on  Linux nor on MacOS platforms

Test Plan:
CI

Rollback Plan:

Differential Revision: D82044853

Pull Request resolved: https://github.com/pytorch/pytorch/pull/162516
Approved by: https://github.com/Skylion007
This commit is contained in:
Nikita Shulga
2025-09-10 04:21:38 +00:00
committed by PyTorch MergeBot
parent e64965300a
commit 5f40a8a9a3

View File

@ -78,7 +78,7 @@ int device_count_impl(bool fail_if_no_driver) {
"would like to use GPUs, turn off ASAN.");
break;
#endif // C10_ASAN_ENABLED
#if _WIN32 && CUDA_VERSION >= 13000
#if defined(_WIN32) && CUDA_VERSION >= 13000
// Workaround for CUDA-13.0 error handling on Windows, see
// https://github.com/pytorch/pytorch/issues/162333#issuecomment-3267929585
case cudaErrorNotSupported: