Skip to content

Commit

Permalink
update condition
Browse files Browse the repository at this point in the history
  • Loading branch information
wilson-seok committed Oct 21, 2024
1 parent 019aa2e commit bce317e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/plugins/intel_gpu/src/kernel_selector/jitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2199,16 +2199,19 @@ std::string FusedOpsCodeGenerator::GetJitLoad(const FusedOpsConfiguration& conf,
return block_read;
}

bool multiple_element = false;
for (auto dim : input_tensor.GetDims()) {
auto v = dim.v;
if (v > 1) {
multiple_element = true;
break;
bool multiple_elements = false;
// For dynamic shape input tensor, check any one of static dimension has more than one element.
if (input_tensor.is_dynamic()) {
for (auto dim : input_tensor.GetDims()) {
auto v = dim.v;
if (v > 1) {
multiple_elements = true;
break;
}
}
}

if (input_tensor.LogicalSize() > 1 || multiple_element) {
if (input_tensor.LogicalSize() > 1 || multiple_elements) {
// Currently we assume that in such scenario we can safely load sub_group_size elements from the pointer
return Broadcast(block_read, input_dt, vec_size);
} else {
Expand Down

0 comments on commit bce317e

Please sign in to comment.