X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=inference-engine%2Fthirdparty%2FclDNN%2Fkernel_selector%2Fcore%2Factual_kernels%2Freorder%2Freorder_kernel_binary.cpp;h=7ddc661e8fe4c01f8de79203dbfa955491528201;hb=0923303e0201c5b59386ab146d0e30b2ef79272d;hp=3e16d8a8f4dbda8324ef335892820bbdc1c35282;hpb=ba6e22b1b5ee4cbefcc30e8d9493cddb0bb3dfdf;p=platform%2Fupstream%2Fdldt.git diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_binary.cpp b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_binary.cpp index 3e16d8a..7ddc661 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_binary.cpp +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_binary.cpp @@ -24,10 +24,13 @@ ParamsKey ReorderKernelBinary::GetSupportedKey() const { k.EnableInputDataType(Datatype::F32); k.EnableInputDataType(Datatype::BINARY); k.EnableOutputDataType(Datatype::BINARY); + k.EnableOutputDataType(Datatype::F32); + k.EnableOutputDataType(Datatype::F16); k.EnableDifferentTypes(); k.EnableInputLayout(DataLayout::bfyx); k.EnableInputLayout(DataLayout::b_fs_yx_32fp); k.EnableOutputLayout(DataLayout::b_fs_yx_32fp); + k.EnableOutputLayout(DataLayout::bfyx); k.EnableTensorOffset(); k.EnableTensorPitches(); k.EnableBatching(); @@ -42,13 +45,17 @@ JitConstants ReorderKernelBinary::GetJitConstants(const reorder_params& params) const auto& input = newParams.inputs[0]; jit.AddConstant(MakeJitConstant("ELEMENTS_COUNT", input.LogicalSize())); jit.AddConstant(MakeJitConstant("IFM_PACK_SIZE", 32)); - jit.AddConstant(MakeJitConstant("OUTPUT_PACKED_FEATURES_NUM", CeilDiv(params.output.Feature().v, 32))); if (input.GetDType() == Datatype::BINARY) { jit.AddConstant(MakeJitConstant("BINARY_INPUT", 1)); jit.AddConstant(MakeJitConstant("INPUT_PACKED_FEATURES_NUM", CeilDiv(input.Feature().v, 16))); } + if (params.output.GetDType() == Datatype::BINARY) { + jit.AddConstant(MakeJitConstant("BINARY_OUTPUT", 1)); + jit.AddConstant(MakeJitConstant("OUTPUT_PACKED_FEATURES_NUM", CeilDiv(params.output.Feature().v, 32))); + } + return jit; } @@ -76,10 +83,18 @@ KernelsData ReorderKernelBinary::GetKernelsData(const Params& params, const opti const reorder_params& orgParams = static_cast(params); + if (orgParams.inputs[0].GetDType() != Datatype::BINARY && + orgParams.output.GetDType() != Datatype::BINARY) + return {}; + if (orgParams.inputs[0].GetDType() == Datatype::BINARY && orgParams.inputs[0].GetLayout() != DataLayout::b_fs_yx_32fp) return {}; + if (orgParams.output.GetDType() == Datatype::BINARY && + orgParams.output.GetLayout() != DataLayout::b_fs_yx_32fp) + return {}; + auto estimatedTime = FORCE_PRIORITY_6; return GetCommonKernelsData(orgParams, options, estimatedTime);