From aedb49beb4c824bb7e339133b66bb20d00a624d9 Mon Sep 17 00:00:00 2001 From: Yueqing Zhang Date: Thu, 2 Jan 2025 06:45:21 -0800 Subject: [PATCH] [VitisAI] change all support tensor type from ir 9 to ir 10 (#23204) ### Description Changed all support tensor type from ir 9 to ir 10. ### Motivation and Context - See issue https://github.com/microsoft/onnxruntime/issues/23205 Co-authored-by: Yueqing Zhang --- include/onnxruntime/core/framework/data_types.h | 1 + onnxruntime/core/framework/data_types.cc | 6 ++++++ onnxruntime/core/session/custom_ops.cc | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/onnxruntime/core/framework/data_types.h b/include/onnxruntime/core/framework/data_types.h index 87feefa10ca4a..d8822b3e452d5 100644 --- a/include/onnxruntime/core/framework/data_types.h +++ b/include/onnxruntime/core/framework/data_types.h @@ -208,6 +208,7 @@ class DataTypeImpl { static const std::vector& AllTensorTypes(); // up to IR4 (no float 8), deprecated static const std::vector& AllTensorTypesIRv4(); static const std::vector& AllTensorTypesIRv9(); + static const std::vector& AllTensorTypesIRv10(); static const std::vector& AllFixedSizeTensorTypes(); // up to IR4 (no float 8), deprecated static const std::vector& AllFixedSizeTensorTypesIRv4(); diff --git a/onnxruntime/core/framework/data_types.cc b/onnxruntime/core/framework/data_types.cc index 322afcf384864..06aab16f4a44b 100644 --- a/onnxruntime/core/framework/data_types.cc +++ b/onnxruntime/core/framework/data_types.cc @@ -1301,6 +1301,12 @@ const std::vector& DataTypeImpl::AllTensorTypesIRv9() { return all_tensor_types; } +const std::vector& DataTypeImpl::AllTensorTypesIRv10() { + static std::vector all_tensor_types = + GetTensorTypesFromTypeList(); + return all_tensor_types; +} + const std::vector& DataTypeImpl::AllFixedSizeSequenceTensorTypes() { return AllFixedSizeSequenceTensorTypesIRv4(); } diff --git a/onnxruntime/core/session/custom_ops.cc b/onnxruntime/core/session/custom_ops.cc index 33d2a0244b453..8492391172133 100644 --- a/onnxruntime/core/session/custom_ops.cc +++ b/onnxruntime/core/session/custom_ops.cc @@ -49,7 +49,7 @@ static constexpr uint32_t min_ort_version_with_shape_inference = 17; #endif #if !defined(DISABLE_FLOAT8_TYPES) -#define SUPPORTED_TENSOR_TYPES DataTypeImpl::AllTensorTypesIRv9() +#define SUPPORTED_TENSOR_TYPES DataTypeImpl::AllTensorTypesIRv10() #else #define SUPPORTED_TENSOR_TYPES DataTypeImpl::AllTensorTypesIRv4() #endif