Skip to content

Commit

Permalink
[GPU] Debug fix for leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
p-durandin committed Oct 8, 2024
1 parent 890f2e1 commit 043a528
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,10 @@ JitConstants ConvolutionKernel_b_fs_yx_fsv16::GetJitConstants(const convolution_
if (params.outputs[0].Feature().v % tuning_data.feature_block_size != 0) {
jit.AddConstant(MakeJitConstant("OUTPUT_LEFTOVERS", 1));
}
std::cout << "Leftovers case 1" << std::endl;
if (inFeaturesPerGroup % tuning_data.feature_block_size != 0 && !multipleGroupsInputPreload) {
// test
std::cout << "Constant 1 crated" << std::endl;
jit.AddConstant(MakeJitConstant("INPUT_LEFTOVERS", 1));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ JitConstants ConvolutionKernel_b_fs_yx_fsv16_1x1::GetJitConstants(const convolut
if (params.outputs[0].Feature().v % tuning_data.feature_block_size != 0) {
jit.AddConstant(MakeJitConstant("OUTPUT_LEFTOVERS", 1));
}
std::cout << "Leftovers case 2" << std::endl;
if (params.inputs[0].Feature().v % tuning_data.feature_block_size != 0) {
std::cout << "Constant 2 created" << std::endl;
jit.AddConstant(MakeJitConstant("INPUT_LEFTOVERS", 1));
}
} else {
Expand Down Expand Up @@ -306,9 +308,14 @@ JitConstants ConvolutionKernel_b_fs_yx_fsv16_1x1::GetJitConstants(const convolut
const auto output_leftover = "(" + output_leftover_num + "!= 0)";
jit.AddConstant(MakeJitConstant("OUTPUT_LEFTOVERS", output_leftover));

const auto input_leftover_num = "(" + input0_dims.f() + "%" + feature_block_size + ")";
const auto input_leftover = "(" + input_leftover_num + "!= 0)";
jit.AddConstant(MakeJitConstant("INPUT_LEFTOVERS", input_leftover));
//const auto input_leftover_num = "(" + input0_dims.f() + "%" + feature_block_size + ")";
//const auto input_leftover = "(" + input_leftover_num + "!= 0)";
//jit.AddConstant(MakeJitConstant("INPUT_LEFTOVERS", input_leftover));
std::cout << "Leftovers case 3" << std::endl;
if (params.inputs[0].Feature().v % tuning_data.feature_block_size != 0) {
std::cout << "Constant 3 created" << std::endl;
jit.AddConstant(MakeJitConstant("INPUT_LEFTOVERS", 1));
}
}

return jit;
Expand Down

0 comments on commit 043a528

Please sign in to comment.