Skip to content

Commit

Permalink
[VitisAI] change all support tensor type from ir 9 to ir 10 (#23204)
Browse files Browse the repository at this point in the history
### Description
<!-- Describe your changes. -->
Changed all support tensor  type from ir 9 to ir 10.


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
- See issue #23205

Co-authored-by: Yueqing Zhang <[email protected]>
  • Loading branch information
BoarQing and Yueqing Zhang authored Jan 2, 2025
1 parent bc91f5c commit aedb49b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/onnxruntime/core/framework/data_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ class DataTypeImpl {
static const std::vector<MLDataType>& AllTensorTypes(); // up to IR4 (no float 8), deprecated
static const std::vector<MLDataType>& AllTensorTypesIRv4();
static const std::vector<MLDataType>& AllTensorTypesIRv9();
static const std::vector<MLDataType>& AllTensorTypesIRv10();

static const std::vector<MLDataType>& AllFixedSizeTensorTypes(); // up to IR4 (no float 8), deprecated
static const std::vector<MLDataType>& AllFixedSizeTensorTypesIRv4();
Expand Down
6 changes: 6 additions & 0 deletions onnxruntime/core/framework/data_types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,12 @@ const std::vector<MLDataType>& DataTypeImpl::AllTensorTypesIRv9() {
return all_tensor_types;
}

const std::vector<MLDataType>& DataTypeImpl::AllTensorTypesIRv10() {
static std::vector<MLDataType> all_tensor_types =
GetTensorTypesFromTypeList<element_type_lists::AllIRv10>();
return all_tensor_types;
}

const std::vector<MLDataType>& DataTypeImpl::AllFixedSizeSequenceTensorTypes() {
return AllFixedSizeSequenceTensorTypesIRv4();
}
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/session/custom_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aedb49b

Please sign in to comment.