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

[IE CLDNN] Fix fused ops data loading in 1x1 conv fsv16 kernel #1948

Merged
merged 1 commit into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -165,17 +165,25 @@ JitConstants ConvolutionKernel_b_fs_yx_fsv16_1x1::GetJitConstants(const convolut
jit.AddConstant(MakeJitConstant("PADDED_INPUT", params.inputs[0].X().pad.Total() != 0));

bool padded_output = params.output.X().pad.Total() != 0;
bool non_unit_fused_op_spatial = false;

// Set padded_output to true when fused inputs have paddings to have correct blocked loads
for (auto& fused_op : params.fused_ops) {
for (auto& t : fused_op.tensors) {
if (t.PitchesDifferFromLogicalDims()) {
padded_output = true;
}
if ((t.X().v > 1) ||
(t.Y().v > 1) ||
(t.Z().v > 1) ||
(t.W().v > 1)) {
non_unit_fused_op_spatial = true;
}
}
}

jit.AddConstant(MakeJitConstant("PADDED_OUTPUT", padded_output));
jit.AddConstant(MakeJitConstant("NON_UNIT_FUSED_OP_SPATIAL", non_unit_fused_op_spatial));

jit.AddConstant(MakeJitConstant("X_BLOCK_SIZE", blockWidth));
jit.AddConstant(MakeJitConstant("X_BLOCKS", CeilDiv(params.output.X().v, blockWidth)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ KERNEL(convolution_b_fs_yx_fsv16_1x1)(
else
#endif
{
#if !PADDED_OUTPUT
#if !PADDED_OUTPUT && !NON_UNIT_FUSED_OP_SPATIAL
if (xy * X_BLOCK_SIZE + X_BLOCK_SIZE <= OUTPUT_SIZE_X * OUTPUT_SIZE_Y || (OUTPUT_SIZE_X * OUTPUT_SIZE_Y) % X_BLOCK_SIZE == 0) {
#else
if (x + X_BLOCK_SIZE <= OUTPUT_SIZE_X || OUTPUT_SIZE_X % X_BLOCK_SIZE == 0) {
Expand Down