diff --git a/onnxruntime/core/providers/cuda/cuda_common.h b/onnxruntime/core/providers/cuda/cuda_common.h index b5fb6274f6..94f56a346c 100644 --- a/onnxruntime/core/providers/cuda/cuda_common.h +++ b/onnxruntime/core/providers/cuda/cuda_common.h @@ -11,12 +11,7 @@ #include "core/providers/cuda/shared_inc/fast_divmod.h" #include "gsl/gsl" -// Can't include "core/util/math.h" in a provider, so this is the part we need for cuda: namespace onnxruntime { -namespace math { -uint16_t floatToHalf(float f); -} - namespace cuda { #define CUDA_RETURN_IF_ERROR(expr) \ @@ -103,8 +98,8 @@ inline bool CalculateFdmStrides(gsl::span p, const std::vector= 7 : true ); +#if defined(CUDA_VERSION) && CUDA_VERSION < 11000 + enable_ = (mode == CUBLAS_TENSOR_OP_MATH ? prop.major >= 7 : true); #else enable_ = (mode == CUBLAS_TF32_TENSOR_OP_MATH ? prop.major >= 8 : true); #endif diff --git a/onnxruntime/core/providers/shared_library/provider_api.h b/onnxruntime/core/providers/shared_library/provider_api.h index 515b73b87d..906366adeb 100644 --- a/onnxruntime/core/providers/shared_library/provider_api.h +++ b/onnxruntime/core/providers/shared_library/provider_api.h @@ -13,9 +13,10 @@ #include "core/providers/cpu/tensor/onehot.h" #include "core/providers/cpu/tensor/gather_elements.h" +namespace onnxruntime { template using DeleteOnUnloadPtr = std::unique_ptr; - +} #else #define SHARED_PROVIDER 1