#if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION) #pragma once // MSVC keeps __cplusplus at 199711L unless /Zc:__cplusplus is passed, so check // _MSVC_LANG there. nvcc on Windows preprocesses with cl and forwards its -std // to it, so this also covers .cu files. #if (defined(_MSVC_LANG) && _MSVC_LANG < 202002L) || \ (!defined(_MSVC_LANG) && __cplusplus < 202002L) #error C++20 or later compatible compiler is required to use ATen. #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // TODO: try to remove this // There is some back story, see https://github.com/pytorch/pytorch/issues/48684 #include #else #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined." #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)