[GPU] Rename exec mode options (#14798)

This commit is contained in:
Vladimir Paramuzov authored and GitHub committed 2022-12-23 17:02:31 +04:00
1 parent ecfeda32e3
commit 3414fc402a
50 files changed
+93 -93

No files matched your search

@@ -37,7 +37,7 @@ protected:
const std::pair<std::string, std::string>& jit,
const std::string& entry_point,
const EngineInfo& engine_info,
const std::string& exe_mode = DEFAULT) const;
const std::string& exe_mode = EXE_MODE_DEFAULT) const;
uint32_t GetFusedPrimitiveInputsCount(const Params &params) const;
@@ -47,7 +47,7 @@ protected:
const std::string& kernel_map_name,
const std::pair<std::string, std::string>& jit,
const std::string& entry_point,
const std::string& exe_mode = DEFAULT,
const std::string& exe_mode = EXE_MODE_DEFAULT,
bool weights = false,
bool bias = false,
int number_of_inputs = 1,
@@ -15,9 +15,9 @@
#include <string>
#include <vector>
#define AGE_BASED "-cl-no-subgroup-ifp"
#define DEFAULT ""
#define NO_PRERA_SCH "-cl-intel-no-prera-scheduling"
#define EXE_MODE_DEFAULT ""
#define EXE_MODE_AGE_BASED "-cl-no-subgroup-ifp"
#define EXE_MODE_NO_PRERA_SCH "-cl-intel-no-prera-scheduling"
namespace kernel_selector {
@@ -88,7 +88,7 @@ KernelsData ActivationKernelBase::GetCommonKernelsData(const Params& params, con
auto& kernel = kd.kernels[0];
FillCLKernelData(kernel, dispatchData, params.engineInfo, kernelName, jit, entry_point,
DEFAULT, false, false, 1, GetFusedPrimitiveInputsCount(params));
EXE_MODE_DEFAULT, false, false, 1, GetFusedPrimitiveInputsCount(params));
if (!newParams.inputActivationParams.empty()) {
kernel.params.arguments.push_back({ArgumentDescriptor::Types::SLOPE, 0});
@@ -248,7 +248,7 @@ std::string BinaryConvolutionKernelBase::GetAutoTuneOptions(int autoTuneIndex) c
return autoTuneOptions[autoTuneIndex];
}
return DEFAULT;
return EXE_MODE_DEFAULT;
}
KernelsData BinaryConvolutionKernelBase::GetTunedKernelsDataByIndex(const Params& params,
@@ -43,7 +43,7 @@ public:
};
std::string GetAutoTuneOptions(int autoTuneIndex) const;
std::vector<std::string> autoTuneOptions = {DEFAULT, NO_PRERA_SCH, AGE_BASED};
std::vector<std::string> autoTuneOptions = {EXE_MODE_DEFAULT, EXE_MODE_NO_PRERA_SCH, EXE_MODE_AGE_BASED};
KernelsData GetKernelsDataForAutoTune(const Params& params, const optional_params& options) const override;
KernelsData GetTunedKernelsDataByIndex(const Params& params,
const optional_params& options,
@@ -61,7 +61,7 @@ protected:
static bool CheckWorkGroups(const DispatchData&);
KernelsData GetCommonKernelsData(const Params& params,
const optional_params& options,
const std::string exeMode = DEFAULT,
const std::string exeMode = EXE_MODE_DEFAULT,
int autoTuneIndex = -1) const;
};
@@ -81,7 +81,7 @@ KernelsData BroadcastKernelBase::GetCommonKernelsData(const Params& params,
auto& kernel = k_data.kernels[0];
FillCLKernelData(kernel, dispatchData, params.engineInfo, kernelName, jit, entry_point,
DEFAULT,
EXE_MODE_DEFAULT,
false,
false,
1,
@@ -40,18 +40,18 @@ ConvolutionKernel_b_fs_yx_fsv16::AutoTuneOption ConvolutionKernel_b_fs_yx_fsv16:
auto f = cp.outputs[0].Feature().v;
if (x * f <= 256) {
if (x <= 8 || x * f <= 128)
return { 2, DEFAULT };
return { 2, EXE_MODE_DEFAULT };
else
return { 4, DEFAULT };
return { 4, EXE_MODE_DEFAULT };
} else if (x * f <= 1536) {
return { 4, DEFAULT };
return { 4, EXE_MODE_DEFAULT };
} else {
if (x >= 8 && x < 12 && x * f < 2600)
return { 4, DEFAULT };
return { 4, EXE_MODE_DEFAULT };
else if (x < 12 && x * f < 8192)
return { 8, DEFAULT };
return { 8, EXE_MODE_DEFAULT };
else
return { 8, AGE_BASED };
return { 8, EXE_MODE_AGE_BASED };
}
}
@@ -29,16 +29,16 @@ ConvolutionKernel_b_fs_yx_fsv16_1x1::AutoTuneOption ConvolutionKernel_b_fs_yx_fs
auto f = cp.outputs[0].Feature().v;
if (x == 1 && y == 1) {
return { 1, DEFAULT };
return { 1, EXE_MODE_DEFAULT };
} else if (x * f <= 256) {
if (x < 8 || x * f <= 128)
return { 2, DEFAULT };
return { 2, EXE_MODE_DEFAULT };
else
return { 4, DEFAULT };
return { 4, EXE_MODE_DEFAULT };
} else if (x * f <= 1536) {
return { 4, DEFAULT };
return { 4, EXE_MODE_DEFAULT };
} else {
return { 8, DEFAULT };
return { 8, EXE_MODE_DEFAULT };
}
}
@@ -250,7 +250,7 @@ JitConstants ConvolutionKernel_b_fs_yx_fsv16_1x1::GetJitConstants(const convolut
}
KernelsData ConvolutionKernel_b_fs_yx_fsv16_1x1::GetKernelsData(const Params& params, const optional_params& options) const {
return GetCommonKernelsData(params, options, DEFAULT, -1);
return GetCommonKernelsData(params, options, EXE_MODE_DEFAULT, -1);
}
} // namespace kernel_selector
@@ -228,7 +228,7 @@ Convolution_kernel_b_fs_yx_fsv16_imad_1x1::GetAutoTuneParams(const convolution_p
size_t block_spatial = 1;
size_t block_features = 1;
size_t feature_slm_split = 1;
std::string exe_mode = DEFAULT;
std::string exe_mode = EXE_MODE_DEFAULT;
size_t total_spatial = params.outputs[0].X().v * params.outputs[0].Y().v;
// Try two features per work-item
@@ -131,11 +131,11 @@ ConvolutionKernel_b_fs_yx_fsv_16_32_imad_dw::GetAutoTuneParams(const convolution
bool stride_2x2 = params.stride.x == 2 && params.stride.y == 2;
// Filter 3x3 with stride 1x1
if (fsv == 16 && filter_3x3 && stride_1x1 && dilation_1x1 && output.X().v == 75 && output.Y().v == 75)
try_to_select(16, 15, 1, 4, true, DEFAULT);
try_to_select(16, 15, 1, 4, true, EXE_MODE_DEFAULT);
// Filter 3x3 with stride 2x2
if (fsv == 16 && filter_3x3 && stride_2x2 && dilation_1x1 && output.X().v == 75 && output.Y().v == 75)
try_to_select(16, 15, 1, 16, true, DEFAULT);
try_to_select(16, 15, 1, 16, true, EXE_MODE_DEFAULT);
// Check if SLM can provide data reuse for current parameters
bool use_slm_x = (params.filterSize.x - 1) * params.dilation.x + 1 >= params.stride.x;
@@ -182,7 +182,7 @@ ConvolutionKernel_b_fs_yx_fsv_16_32_imad_dw::GetAutoTuneParams(const convolution
lws0 = 2;
if (tile_selected)
try_to_select(16, tile_x, lws0, lws1, true, DEFAULT);
try_to_select(16, tile_x, lws0, lws1, true, EXE_MODE_DEFAULT);
}
if (!selected) {
@@ -197,7 +197,7 @@ ConvolutionKernel_b_fs_yx_fsv_16_32_imad_dw::GetAutoTuneParams(const convolution
tune_params.lws0 = 1;
tune_params.lws1 = 1;
tune_params.preload_input_slm = false;
tune_params.exeMode = DEFAULT;
tune_params.exeMode = EXE_MODE_DEFAULT;
}
return tune_params;
@@ -224,7 +224,7 @@ bool ConvolutionKernel_b_fs_yx_fsv_16_32_imad_dw::ValidateAutoTuneParams(const c
valid_tune_params &= tparams.tile_x * tparams.lws0 <= Align(params.outputs[0].X().v, 2);
// Filter out combinations that are known to be sub-optimal in order to reduce search space
valid_tune_params &= tparams.exeMode == DEFAULT;
valid_tune_params &= tparams.exeMode == EXE_MODE_DEFAULT;
valid_tune_params &= tparams.preload_input_slm || tparams.lws0 * tparams.lws1 == 1;
valid_tune_params &= !tparams.preload_input_slm || (tparams.lws0 * tparams.lws1) % 2 == 0;
@@ -353,7 +353,7 @@ std::string ConvolutionKernelBase::GetAutoTuneOptions(int autoTuneIndex) const {
return autoTuneOptions[autoTuneIndex];
}
return DEFAULT;
return EXE_MODE_DEFAULT;
}
KernelsData ConvolutionKernelBase::GetTunedKernelsDataByIndex(const Params& params,
@@ -43,7 +43,7 @@ public:
};
std::string GetAutoTuneOptions(int autoTuneIndex) const;
std::vector<std::string> autoTuneOptions = {DEFAULT, NO_PRERA_SCH, AGE_BASED};
std::vector<std::string> autoTuneOptions = {EXE_MODE_DEFAULT, EXE_MODE_NO_PRERA_SCH, EXE_MODE_AGE_BASED};
KernelsData GetKernelsDataForAutoTune(const Params& params, const optional_params& options) const override;
KernelsData GetTunedKernelsDataByIndex(const Params& params,
const optional_params& options,
@@ -61,7 +61,7 @@ protected:
static bool CheckPitchForSplitOnly(const convolution_params& params);
KernelsData GetCommonKernelsData(const Params& params,
const optional_params& options,
const std::string exeMode = DEFAULT,
const std::string exeMode = EXE_MODE_DEFAULT,
int autoTuneIndex = -1) const;
Datatype GetPackedType(Datatype dt, size_t pack_size = 4) const;
@@ -107,7 +107,7 @@ ConvolutionKernel_bfyx_os_iyx_osv16::AutoTuneOption ConvolutionKernel_bfyx_os_iy
return autoTuneOptions[autoTuneIndex];
}
AutoTuneOption option = {0, 0, 0, DEFAULT};
AutoTuneOption option = {0, 0, 0, EXE_MODE_DEFAULT};
const convolution_params& cp = static_cast<const convolution_params&>(p);
@@ -30,7 +30,7 @@ ConvolutionKernel_bfyx_to_bfyx_f16::AutoTuneOption ConvolutionKernel_bfyx_to_bfy
if (autoTuneIndex >= 0 && autoTuneIndex < static_cast<int>(autoTuneOptions.size()))
return autoTuneOptions[autoTuneIndex];
return {8, AGE_BASED};
return {8, EXE_MODE_AGE_BASED};
}
ParamsKey ConvolutionKernel_bfyx_to_bfyx_f16::GetSupportedKey() const {
@@ -60,7 +60,7 @@ ConvolutionKernel_bfyx_to_fs_byx_fsv32::AutoTuneOption ConvolutionKernel_bfyx_to
if (autoTuneIndex >= 0 && autoTuneIndex < static_cast<int>(autoTuneOptions.size()))
return autoTuneOptions[autoTuneIndex];
return {8, 2, AGE_BASED};
return {8, 2, EXE_MODE_AGE_BASED};
}
ConvolutionKernelBase::DispatchData ConvolutionKernel_bfyx_to_fs_byx_fsv32::SetDefault(const convolution_params& arg,
@@ -75,7 +75,7 @@ ConvolutionKernel_fs_byx_fsv32::AutoTuneOption ConvolutionKernel_fs_byx_fsv32::G
// Check if output can be evenly divided into large blocks
for (auto w : optBlockWidths) {
if (cp.outputs[0].X().v % w == 0 && getMinRegisterUsage(cp, w) < regThreshold)
return {w, AGE_BASED};
return {w, EXE_MODE_AGE_BASED};
}
// Try to find large blocks with smallest offset
@@ -89,16 +89,16 @@ ConvolutionKernel_fs_byx_fsv32::AutoTuneOption ConvolutionKernel_fs_byx_fsv32::G
}
if (foundWidth != 0)
return {foundWidth, AGE_BASED};
return {foundWidth, EXE_MODE_AGE_BASED};
// Check small and memory bound block sizes
for (auto w : nonOptBlockWidths) {
if (cp.outputs[0].X().v % w == 0 && getMinRegisterUsage(cp, w) < regThreshold)
return {w, AGE_BASED};
return {w, EXE_MODE_AGE_BASED};
}
// This means all previous block sizes consumed too much registers, fallback to block width = 1
return {1, AGE_BASED};
return {1, EXE_MODE_AGE_BASED};
}
ConvolutionKernelBase::DispatchData ConvolutionKernel_fs_byx_fsv32::SetDefault(const convolution_params& arg,
@@ -57,7 +57,7 @@ ConvolutionKernel_fs_byx_fsv32_1x1::AutoTuneOption ConvolutionKernel_fs_byx_fsv3
const convolution_params& cp = static_cast<const convolution_params&>(arg);
ConvolutionKernel_fs_byx_fsv32_1x1::AutoTuneOption result = {1, 1, AGE_BASED};
ConvolutionKernel_fs_byx_fsv32_1x1::AutoTuneOption result = {1, 1, EXE_MODE_AGE_BASED};
size_t selected_w = 0;
size_t selected_h = 0;
@@ -94,7 +94,7 @@ ConvolutionKernel_fs_byx_fsv32_1x1::AutoTuneOption ConvolutionKernel_fs_byx_fsv3
selected_w = maxBlockSize / selected_h;
}
return {selected_w, selected_h, AGE_BASED};
return {selected_w, selected_h, EXE_MODE_AGE_BASED};
}
ConvolutionKernelBase::DispatchData ConvolutionKernel_fs_byx_fsv32_1x1::SetDefault(const convolution_params& arg,
@@ -72,7 +72,7 @@ ConvolutionKernel_fs_byx_fsv32_depthwise::AutoTuneOption ConvolutionKernel_fs_by
// Check if output can be evenly divided into large blocks
for (auto w : optBlockWidths) {
if (cp.outputs[0].X().v % w == 0 && getMinRegisterUsage(cp, w) < regThreshold)
return {w, AGE_BASED};
return {w, EXE_MODE_AGE_BASED};
}
// Try to find large blocks with smallest offset
@@ -86,16 +86,16 @@ ConvolutionKernel_fs_byx_fsv32_depthwise::AutoTuneOption ConvolutionKernel_fs_by
}
if (foundWidth != 0)
return {foundWidth, AGE_BASED};
return {foundWidth, EXE_MODE_AGE_BASED};
// Check small and memory bound block sizes
for (auto w : nonOptBlockWidths) {
if (cp.outputs[0].X().v % w == 0 && getMinRegisterUsage(cp, w) < regThreshold)
return {w, AGE_BASED};
return {w, EXE_MODE_AGE_BASED};
}
// This means all previous block sizes consumed too much registers, fallback to block width = 1
return {1, AGE_BASED};
return {1, EXE_MODE_AGE_BASED};
}
ConvolutionKernelBase::DispatchData ConvolutionKernel_fs_byx_fsv32_depthwise::SetDefault(const convolution_params& arg,
@@ -124,7 +124,7 @@ ConvolutionKernel_imad_b_fs_yx_fsv4_1x1::AutoTuneParams ConvolutionKernel_imad_b
// Set default ones
if (!selected) {
auto lwg_depth = get_preferred_lwg_depth(params.outputs[0], params.weights, params.engineInfo);
tune_params = AutoTuneParams{ pref_simd, pref_features_per_wi, lwg_depth, false, DEFAULT };
tune_params = AutoTuneParams{ pref_simd, pref_features_per_wi, lwg_depth, false, EXE_MODE_DEFAULT };
}
return tune_params;
@@ -68,7 +68,7 @@ ConvolutionKernel_mmad_b_fs_yx_fsv32::AutoTuneOption ConvolutionKernel_mmad_b_fs
return autoTuneOptions[autoTuneIndex];
}
AutoTuneOption option = {0, 0, 0, DEFAULT};
AutoTuneOption option = {0, 0, 0, EXE_MODE_DEFAULT};
auto& params = dynamic_cast<const convolution_params&>(p);
auto& output = params.outputs[0];
@@ -79,7 +79,7 @@ ConvolutionKernel_mmad_bfyx_to_b_fs_yx_fsv32::AutoTuneOption ConvolutionKernel_m
return autoTuneOptions[autoTuneIndex];
}
AutoTuneOption option = {0, 0, 0, DEFAULT};
AutoTuneOption option = {0, 0, 0, EXE_MODE_DEFAULT};
auto &params = dynamic_cast<const convolution_params &>(p);
auto &output = params.outputs[0];
@@ -59,7 +59,7 @@ ConvolutionKernel_mmad_bfyx_to_b_fs_yx_fsv4::AutoTuneOption ConvolutionKernel_mm
return autoTuneOptions[autoTuneIndex];
}
AutoTuneOption option = {0, 0, 0, DEFAULT};
AutoTuneOption option = {0, 0, 0, EXE_MODE_DEFAULT};
auto &params = dynamic_cast<const convolution_params &>(p);
auto &output = params.outputs[0];
@@ -91,7 +91,7 @@ KernelsData DeformableConvolutionKernel_bfyx_interp::GetKernelsData(const Params
auto& kernel = kd.kernels[0];
FillCLKernelData(kernel, dispatchData, params.engineInfo, kernelName, jit, entry_point, DEFAULT,
FillCLKernelData(kernel, dispatchData, params.engineInfo, kernelName, jit, entry_point, EXE_MODE_DEFAULT,
false, false, static_cast<int>(newParams.inputs.size()));
return {kd};
@@ -132,7 +132,7 @@ KernelsData DeconvolutionKernelBase::GetKernelsData(const Params& params, const
kernelName,
jit,
entry_point,
DEFAULT,
EXE_MODE_DEFAULT,
true,
!newParams.bias.empty(),
1,
@@ -56,7 +56,7 @@ KernelsData DepthToSpaceKernelBase::GetCommonKernelsData(const Params& params, c
auto& kernel = kd.kernels[0];
FillCLKernelData(kernel, dispatchData, params.engineInfo, kernelName, jit, entry_point,
DEFAULT, false, false, 1, GetFusedPrimitiveInputsCount(params));
EXE_MODE_DEFAULT, false, false, 1, GetFusedPrimitiveInputsCount(params));
return { kd };
}
@@ -334,7 +334,7 @@ KernelsData EltwiseKernel_b_fs_yx_fsv16::GetKernelsData(const Params& params, co
auto& kernel = kd.kernels[0];
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, DEFAULT);
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, EXE_MODE_DEFAULT);
kernel.params.workGroups.global = dispatchData.gws;
kernel.params.workGroups.local = dispatchData.lws;
@@ -50,7 +50,7 @@ KernelsData EltwiseKernel_b_fs_yx_fsv4::GetKernelsData(const Params& params, con
kernel.params.workGroups.global = dispatchData.gws;
kernel.params.workGroups.local = dispatchData.lws;
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, DEFAULT);
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, EXE_MODE_DEFAULT);
kernel.params.arguments = GetArgsDesc((uint32_t)newParams.inputs.size(),
false,
false,
@@ -700,7 +700,7 @@ KernelsData EltwiseKernelBase::GetCommonKernelsData(const Params& params, const
auto& kernel = kd.kernels[0];
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, DEFAULT);
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, EXE_MODE_DEFAULT);
kernel.params.workGroups.global = dispatchData.gws;
kernel.params.workGroups.local = dispatchData.lws;
@@ -97,7 +97,7 @@ KernelsData EltwiseKernel_fs_b_yx_fsv32::GetKernelsData(const Params& params, co
size_t x = input.X().v;
size_t global_size = featuresRoundedUp * batches * x * y;
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, DEFAULT);
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, EXE_MODE_DEFAULT);
kernel.params.workGroups.global = {std::max(global_size / 8, (size_t)1), 1, 1};
kernel.params.workGroups.local = GetOptimalLocalWorkGroupSizes(kernel.params.workGroups.global, params.engineInfo);
@@ -135,7 +135,7 @@ KernelsData EltwiseKernel_mixed_byxf_and_fs_b_yx_fsv32::GetKernelsData(const Par
kernel.params.workGroups.local = {1, 1, 16};
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, DEFAULT);
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, EXE_MODE_DEFAULT);
kernel.params.arguments = GetArgsDesc((uint32_t)newParams.inputs.size(), false, false);
return {kd};
@@ -135,7 +135,7 @@ KernelsData EltwiseKernel_vload8::GetKernelsData(const Params& params, const opt
auto& kernel = kd.kernels[0];
kernel.params.workGroups.global = {std::max(newParams.inputs[0].LogicalSize() / 8, (size_t)1), 1, 1};
kernel.params.workGroups.local = GetOptimalLocalWorkGroupSizes(kernel.params.workGroups.global, params.engineInfo);
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, DEFAULT);
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, EXE_MODE_DEFAULT);
kernel.params.arguments = GetArgsDesc((uint32_t)newParams.inputs.size(), false, false);
return {kd};
@@ -147,7 +147,7 @@ std::string FullyConnectedKernelBase::GetAutoTuneOptions(int autoTuneIndex) cons
return autoTuneOptions[autoTuneIndex];
}
return DEFAULT;
return EXE_MODE_DEFAULT;
}
KernelsData FullyConnectedKernelBase::GetTunedKernelsDataByIndex(const Params &params,
@@ -43,7 +43,7 @@ public:
};
std::string GetAutoTuneOptions(int autoTuneIndex) const;
std::vector<std::string> autoTuneOptions = {DEFAULT, NO_PRERA_SCH, AGE_BASED};
std::vector<std::string> autoTuneOptions = {EXE_MODE_DEFAULT, EXE_MODE_NO_PRERA_SCH, EXE_MODE_AGE_BASED};
virtual KernelsData GetTunedKernelsDataByIndex(const Params &params,
const optional_params &options,
DataLayout dl,
@@ -57,7 +57,7 @@ protected:
const optional_params &options,
DataLayout dl,
WeightsLayout wl,
const std::string exeMode = DEFAULT,
const std::string exeMode = EXE_MODE_DEFAULT,
int autoTuneIndex = -1) const;
// Fused ops
@@ -186,28 +186,28 @@ FullyConnected_bf_tiled::GetAutoTuneParams(const fully_connected_params& params,
if (dtype == Datatype::F16) {
// tune_params(tile_b, tile_ofm, tile_ifm, tile_k, dispatch_bsv, dispatch_fsv, exec_options)
selector.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 2, 16, 2, AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 2, 16, 1, AGE_BASED))
.Case(tune_params(16, std::min(max_tile_ofm, 2u), 1, 2, 4, 2, AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 2, 8, 1, AGE_BASED))
.Case(tune_params(16, std::min(max_tile_ofm, 2u), 1, 2, 2, 2, AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 2, 4, 1, AGE_BASED))
.Case(tune_params(16, std::min(max_tile_ofm, 2u), 1, 2, 1, 1, AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 2, 1, 1, AGE_BASED));
selector.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 2, 16, 2, EXE_MODE_AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 2, 16, 1, EXE_MODE_AGE_BASED))
.Case(tune_params(16, std::min(max_tile_ofm, 2u), 1, 2, 4, 2, EXE_MODE_AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 2, 8, 1, EXE_MODE_AGE_BASED))
.Case(tune_params(16, std::min(max_tile_ofm, 2u), 1, 2, 2, 2, EXE_MODE_AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 2, 4, 1, EXE_MODE_AGE_BASED))
.Case(tune_params(16, std::min(max_tile_ofm, 2u), 1, 2, 1, 1, EXE_MODE_AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 2, 1, 1, EXE_MODE_AGE_BASED));
}
if (dtype == Datatype::F32) {
// tune_params(tile_b, tile_ofm, tile_ifm, tile_k, dispatch_bsv, dispatch_fsv, exec_options)
selector.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 1, 16, 2, AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 1, 16, 1, AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 1, 8, 1, AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 1, 4, 1, AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 1, 2, 1, AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 1, 1, 1, AGE_BASED));
selector.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 1, 16, 2, EXE_MODE_AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 1, 16, 1, EXE_MODE_AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 1, 8, 1, EXE_MODE_AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 1, 4, 1, EXE_MODE_AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 1, 2, 1, EXE_MODE_AGE_BASED))
.Case(tune_params(8, std::min(max_tile_ofm, 2u), 1, 1, 1, 1, EXE_MODE_AGE_BASED));
}
selector.Case([&](const fully_connected_params&) -> tune_params {
tune_params result(8, std::min(max_tile_ofm, 2u), 1, 2, 1, 1, DEFAULT);
tune_params result(8, std::min(max_tile_ofm, 2u), 1, 2, 1, 1, EXE_MODE_DEFAULT);
while (batch % result.tile_b != 0)
result.tile_b--;
@@ -217,12 +217,12 @@ FullyConnected_bf_tiled::GetAutoTuneParams(const fully_connected_params& params,
result.dispatch_bsv--;
if (result.tile_b >= 8)
result.exec_options = AGE_BASED;
result.exec_options = EXE_MODE_AGE_BASED;
return result;
});
return selector.Default(tune_params(1, 1, 1, 1, 1, 1, DEFAULT));
return selector.Default(tune_params(1, 1, 1, 1, 1, 1, EXE_MODE_DEFAULT));
}
FullyConnected_bf_tiled::DispatchData
@@ -42,7 +42,7 @@ KernelsData GatherTreeKernelBase::GetCommonKernelsData(const Params& params,
kernelName,
jit,
entry_point,
DEFAULT,
EXE_MODE_DEFAULT,
false,
false,
static_cast<int>(gt_params.inputs.size()));
@@ -63,7 +63,7 @@ KernelsData GemmKernelBase::GetCommonKernelsData(const Params& params,
kernelName,
jit,
entry_point,
DEFAULT,
EXE_MODE_DEFAULT,
false,
false,
(uint32_t)prim_params.inputs.size(),
@@ -147,7 +147,7 @@ KernelsData GemmKernelMMADint8::GetKernelsData(const Params& params, const optio
kernelName,
jit,
entry_point,
DEFAULT,
EXE_MODE_DEFAULT,
false,
false,
(uint32_t)prim_params.inputs.size(),
@@ -117,7 +117,7 @@ KernelsData GemmKernelMMADslmInt8::GetKernelsData(const Params& params, const op
kernelName,
jit,
entry_point,
DEFAULT,
EXE_MODE_DEFAULT,
false,
false,
(uint32_t)prim_params.inputs.size(),
@@ -72,7 +72,7 @@ KernelsData CountNonzeroKernelRef::GetKernelsData(const Params& params, const op
newParams.outputs[0].GetLayout(),
dims_by_gws);
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, DEFAULT);
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, EXE_MODE_DEFAULT);
kernel.params.arguments = GetArgsDesc(1, false, false);
return {kd};
@@ -57,7 +57,7 @@ KernelsData GatherNonzeroKernelRef::GetKernelsData(const Params& params, const o
auto& kernel = kd.kernels[0];
kernel.params.workGroups.global = {1, 1, 1};
kernel.params.workGroups.local = {1, 1, 1};
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, DEFAULT);
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, EXE_MODE_DEFAULT);
kernel.params.arguments = GetArgsDesc(2, false, false);
return {kd};
@@ -200,7 +200,7 @@ KernelsData PoolingKernelBase::GetCommonKernelsData(const Params& params,
auto jit = CreateJit(kernelName, cldnn_jit, entry_point);
auto& kernel = kd.kernels[0];
FillCLKernelData(kernel, dispatchData, params.engineInfo, kernelName, jit, entry_point, DEFAULT, false, false, 1,
FillCLKernelData(kernel, dispatchData, params.engineInfo, kernelName, jit, entry_point, EXE_MODE_DEFAULT, false, false, 1,
GetFusedPrimitiveInputsCount(params));
uint32_t param_idx = 1;
@@ -70,7 +70,7 @@ KernelsData QuantizeKernelBase::GetKernelsData(const Params& params, const optio
kernel.params.workGroups.global = dispatchData.gws;
kernel.params.workGroups.local = dispatchData.lws;
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, DEFAULT);
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, EXE_MODE_DEFAULT);
kernel.params.arguments = GetArgsDesc(static_cast<int>(newParams.inputs.size()), false, false);
return {kd};
@@ -34,7 +34,7 @@ KernelsData RangeKernelRef::GetKernelsData(const Params &params, const optional_
auto jit_constants = MakeBaseParamsJitConstants(derived_params);
auto jit = CreateJit(kernelName, jit_constants, entry_point);
auto &clKernelData = kernel_data.kernels[0];
FillCLKernelData(clKernelData, dispatch_data, params.engineInfo, kernelName, jit, entry_point, DEFAULT,
FillCLKernelData(clKernelData, dispatch_data, params.engineInfo, kernelName, jit, entry_point, EXE_MODE_DEFAULT,
false, false, 3);
auto &arguments = clKernelData.params.arguments;
arguments.erase(arguments.begin()+1); // stop is not used by kernel
@@ -241,7 +241,7 @@ KernelsData ReduceKernelBase::GetCommonKernelsData(const Params& p,
kernelName,
jit,
entry_point,
DEFAULT,
EXE_MODE_DEFAULT,
false,
false,
1,
@@ -229,7 +229,7 @@ KernelsData ResampleKernelBase::GetCommonKernelsData(const Params& params, const
auto& kernel = kd.kernels[0];
FillCLKernelData(kernel, dispatchData, params.engineInfo, kernelName, jit, entry_point,
DEFAULT, false, false, 1, GetFusedPrimitiveInputsCount(params));
EXE_MODE_DEFAULT, false, false, 1, GetFusedPrimitiveInputsCount(params));
return {kd};
}
@@ -58,7 +58,7 @@ KernelsData ReshapeKernelRef::GetKernelsData(const Params& params, const optiona
kernel.params.workGroups.global = {gws0, gws1, gws2};
kernel.params.workGroups.local = GetOptimalLocalWorkGroupSizes(kernel.params.workGroups.global, params.engineInfo);
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, DEFAULT);
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, EXE_MODE_DEFAULT);
kernel.params.arguments = GetArgsDesc(1, false, false);
return {kd};
@@ -134,7 +134,7 @@ KernelsData SelectKernelBase::GetCommonKernelsData(const Params& params, const o
kernel.params.workGroups.global = dispatchData.gws;
kernel.params.workGroups.local = dispatchData.lws;
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, DEFAULT);
kernel.code.kernelString = GetKernelString(kernelName, jit, entry_point, params.engineInfo, EXE_MODE_DEFAULT);
kernel.params.arguments = GetArgsDesc((uint32_t)newParams.inputs.size(), false, false);
return {kd};
@@ -49,7 +49,7 @@ KernelsData ShapeOfKernelRef::GetKernelsData(const Params &params, const optiona
kd.kernels[0].params.workGroups.local = dispatchData.lws;
};
FillCLKernelData(clKernelData, dispatch_data, params.engineInfo, kernelName, jit, entry_point, DEFAULT,
FillCLKernelData(clKernelData, dispatch_data, params.engineInfo, kernelName, jit, entry_point, EXE_MODE_DEFAULT,
false, false, 0, 0, 1, derived_params.inputs[0].is_dynamic());
return kernels_data;
}
@@ -80,7 +80,7 @@ KernelsData SoftmaxKernelBase::GetCommonKernelsData(const Params& params, const
bool is_dynamic = orgParams.outputs[0].is_dynamic();
FillCLKernelData(kernel, dispatchData, params.engineInfo, kernelName, jit, entry_point,
DEFAULT,
EXE_MODE_DEFAULT,
false,
false,
1,
@@ -103,7 +103,7 @@ KernelsData SpaceToDepthKernelRef::GetKernelsData(const Params& params, const op
auto& kernel = kd.kernels[0];
FillCLKernelData(kernel, dispatchData, params.engineInfo, kernelName, jit, entry_point,
DEFAULT, false, false, 1, GetFusedPrimitiveInputsCount(params));
EXE_MODE_DEFAULT, false, false, 1, GetFusedPrimitiveInputsCount(params));
return {kd};
}