Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / clDNN / kernel_selector / core / actual_kernels / fully_connected / fully_connected_kernel_bfyx_ref.cpp
index 0c50aec..4c4ddd2 100644 (file)
@@ -46,27 +46,38 @@ namespace kernel_selector
         return k;
     }
 
-    std::unique_ptr<FullyConnected_bfyx_Ref::Parent::DispatchData> FullyConnected_bfyx_Ref::SetDefault(const fully_connected_params& params) const
+    FullyConnected_bfyx_Ref::DispatchData FullyConnected_bfyx_Ref::SetDefault(const fully_connected_params& params, int ) const
     {
         auto runInfo = Parent::SetDefault(params);
         
         std::vector<size_t> global = { params.output.Feature().v, params.output.Batch().v };
         std::vector<size_t> local  = GetOptimalLocalWorkGroupSizes(global);
 
-        runInfo->gws0 = global[0];
-        runInfo->gws1 = global[1];
-        runInfo->gws2 = 1;
+        runInfo.gws0 = global[0];
+        runInfo.gws1 = global[1];
+        runInfo.gws2 = 1;
 
-        runInfo->lws0 = local[0];
-        runInfo->lws1 = local[1];
-        runInfo->lws2 = 1;
+        runInfo.lws0 = local[0];
+        runInfo.lws1 = local[1];
+        runInfo.lws2 = 1;
 
-        return std::move(runInfo);
+        return runInfo;
     }
 
     KernelsData FullyConnected_bfyx_Ref::GetKernelsData(const Params& params, const optional_params& options) const
     {
-        return GetCommonKernelsData(params, options, DataLayout::bfyx,
-        { WeightsLayout::oiyx, WeightsLayout::oyxi, WeightsLayout::iyxo, WeightsLayout::yxio });
+        KernelsData res = {};
+        for (size_t i = 0; i < autoTuneOptions.size(); i++)
+        {
+            KernelsData kd = GetTunedKernelsDataByIndex(params, options, DataLayout::bfyx,
+                { WeightsLayout::oiyx, WeightsLayout::oyxi, WeightsLayout::iyxo, WeightsLayout::yxio },
+                DONT_USE_IF_HAVE_SOMETHING_ELSE, (int)i);
+            if (!kd.empty())
+            {
+                res.emplace_back(kd[0]);
+            }
+        }
+
+        return res;
     }
-}
\ No newline at end of file
+}