Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GPU] Increase FC tile_b size for INT4 shape agnostic kernel #23532

Merged
merged 2 commits into from
Mar 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,13 @@ bool TuneParamsSelector::VerifyTuneParams(const fully_connected_params& params,
return false;

if (tparams.kernel_type == FullyConnected_bf_tiled::KernelType::SLM) {
bool is_i4_u4 = (params.weights.GetDType() == WeightsType::INT4 || params.weights.GetDType() == WeightsType::UINT4);
const auto required_batch_alignment = 64;
if (!params.is_shape_agnostic && (!IsAligned(output_b, required_batch_alignment) || output_b < 256))
return false;

const auto required_tile_b = 8;
if (tparams.tile_b != required_tile_b)
if ((tparams.tile_b != required_tile_b) && !is_i4_u4)
return false;

const auto required_tile_ofm = 2;
Expand Down Expand Up @@ -248,8 +249,12 @@ FullyConnected_bf_tiled::GetAutoTuneParams(const fully_connected_params& params,
} else {
// Try to use SLM kernels if possible
if (preferred_kernel_type != KernelType::DEFAULT) {
if (params.is_shape_agnostic) {
selector.Case(tune_params(16, 2, 2, 4, 1, 1, EXE_MODE_DEFAULT, KernelType::SLM))
.Case(tune_params(16, 2, 1, 4, 1, 1, EXE_MODE_DEFAULT, KernelType::SLM));
}
selector.Case(tune_params(8, 2, 2, 4, 1, 1, EXE_MODE_DEFAULT, KernelType::SLM))
.Case(tune_params(8, 2, 1, 4, 1, 1, EXE_MODE_DEFAULT, KernelType::SLM));
.Case(tune_params(8, 2, 1, 4, 1, 1, EXE_MODE_DEFAULT, KernelType::SLM));
andrew-k-park marked this conversation as resolved.
Show resolved Hide resolved
}
return selector.Default(tune_params(8, 2, 1, 4, 1, 1, EXE_MODE_DEFAULT));
}
Expand Down
Loading