[IE CLDNN] Add Select int32/int16 input support (#5877)

This commit is contained in:
Roman Lyamin authored and GitHub committed 2021-05-28 18:00:51 +03:00
1 parent d2003095dc
commit c8a5044664
3 files changed
+15 -3

No files matched your search

@@ -11,8 +11,10 @@ using namespace LayerTestsDefinitions;
const std::vector<InferenceEngine::Precision> inputPrecision = {
InferenceEngine::Precision::U8,
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::I16,
InferenceEngine::Precision::FP32
InferenceEngine::Precision::I32
};
const std::vector<std::vector<std::vector<size_t>>> noneShapes = {
@@ -59,15 +59,21 @@ JitConstants SelectKernelBase::GetJitConstantsCommon(const select_params& params
// f32, f32, u8
// f16, f16, i8
// f16, f16, u8
// i32, i32, i8
// i32, i32, u8
// i16, i16, i8
// i16, i16, u8
} else {
absType = "abs";
}
// f32, f32, x
if (params.inputs[1].GetDType() == Datatype::F32) {
// i32, i32, x
if (params.inputs[1].GetDType() == Datatype::F32 || params.inputs[1].GetDType() == Datatype::INT32) {
destType = "int";
// f16, f16, x
} else if (params.inputs[1].GetDType() == Datatype::F16) {
// i16, i16, x
} else if (params.inputs[1].GetDType() == Datatype::F16 || params.inputs[1].GetDType() == Datatype::INT16) {
destType = "short";
// i8, i8, f32
// i8, i8, f16
@@ -14,11 +14,15 @@ ParamsKey SelectKernelRef::GetSupportedKey() const {
k.EnableInputDataType(Datatype::F32);
k.EnableInputDataType(Datatype::INT8);
k.EnableInputDataType(Datatype::UINT8);
k.EnableInputDataType(Datatype::INT16);
k.EnableInputDataType(Datatype::INT32);
k.EnableOutputDataType(Datatype::F32);
k.EnableOutputDataType(Datatype::F16);
k.EnableOutputDataType(Datatype::INT8);
k.EnableOutputDataType(Datatype::UINT8);
k.EnableOutputDataType(Datatype::INT16);
k.EnableOutputDataType(Datatype::INT32);
k.EnableInputLayout(DataLayout::bfyx);
k.EnableInputLayout(DataLayout::yxfb);