Let ocl FC to use tile size 1 only when the # of threads is less than the w/ minimal # of threads (#24936)

### Details:
- Fix to resolve perf issue in the platforms with small # of EUs than
128.
### Tickets:
 - *ticket-id*
This commit is contained in:
Taylor Yeonbok Lee 2024-06-11 17:27:13 -07:00 committed by GitHub
parent 1d226d4edc
commit 43de73cbd6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -247,10 +247,11 @@ FullyConnected_bf_tiled::GetAutoTuneParams(const fully_connected_params& params,
if (params.weights.GetDType() == WeightsType::UINT4 || params.weights.GetDType() == WeightsType::INT4) { if (params.weights.GetDType() == WeightsType::UINT4 || params.weights.GetDType() == WeightsType::INT4) {
if (!params.is_shape_agnostic && batch == 1) { if (!params.is_shape_agnostic && batch == 1) {
// Tuning for Meteor Lake // Tuning for Meteor Lake
size_t ideal_num_threads = params.engineInfo.maxThreadsPerDevice * simd; size_t min_num_threads = params.engineInfo.computeUnitsCount * simd;
if (output_f / 2 < ideal_num_threads * 0.8 && params.weights.GetLayout() == WeightsLayout::os_is_yx_osv32_isv2) { if (output_f / 2 < min_num_threads && params.weights.GetLayout() == WeightsLayout::os_is_yx_osv32_isv2) {
GPU_DEBUG_TRACE_DETAIL << "FC bf tiled: Set ofm_tile 1. (output_f : " << output_f GPU_DEBUG_TRACE_DETAIL << "FC bf tiled: Set ofm_tile 1. (output_f : " << output_f
<< ", ideal threads : " << ideal_num_threads << ")" << std::endl; << ", computeUnitsCount : " << params.engineInfo.computeUnitsCount
<< " min_num_threads : " << min_num_threads << ")" << std::endl;
return selector.Default(tune_params(1, 1, 4, 2, 1, 1, EXE_MODE_DEFAULT)); return selector.Default(tune_params(1, 1, 4, 2, 1, 1, EXE_MODE_DEFAULT));
} else { } else {
return selector.Default(tune_params(1, 2, 4, 2, 1, 1, EXE_MODE_DEFAULT)); return selector.Default(tune_params(1, 2, 4, 2, 1, 1, EXE_MODE_DEFAULT));