Skip to content

Commit

Permalink
[GPU] Fix a group conv unit test fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
jade-cho committed Jan 17, 2025
1 parent 7da364d commit 66355ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,6 @@ KERNEL (fused_convolution_eltwise_gpu_imad)(

out[br * OUT_BLOCK_WIDTH + bc] = TO_ACCUMULATOR_TYPE(IMAD(out[br * OUT_BLOCK_WIDTH + bc], inputs, AS_FILTER_TYPE_4(w[wi])));

#ifdef ASYMMETRIC_WEIGHTS_QUANTIZATION
ACCUMULATOR_TYPE dotProdAxWZP = 0;
dotProdAxWZP = TO_ACCUMULATOR_TYPE(IMAD(dotProdAxWZP, inputs, AS_FILTER_TYPE_4(weights_zp_val)));
out[br * OUT_BLOCK_WIDTH + bc] -= dotProdAxWZP;
#endif

#if !defined COMPENSATION_TERM && defined ASYMMETRIC_DATA_QUANTIZATION
out[br * OUT_BLOCK_WIDTH + bc] -= dotProdAZPxW;
#endif
Expand All @@ -297,6 +291,12 @@ KERNEL (fused_convolution_eltwise_gpu_imad)(
defined ASYMMETRIC_WEIGHTS_QUANTIZATION)
out[br * OUT_BLOCK_WIDTH + bc] += dotProdAZPxWZP;
#endif

#ifdef ASYMMETRIC_WEIGHTS_QUANTIZATION
ACCUMULATOR_TYPE dotProdAxWZP = 0;
dotProdAxWZP = TO_ACCUMULATOR_TYPE(IMAD(dotProdAxWZP, inputs, AS_FILTER_TYPE_4(weights_zp_val)));
out[br * OUT_BLOCK_WIDTH + bc] -= dotProdAxWZP;
#endif
}
}
wi++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7685,9 +7685,7 @@ INSTANTIATE_TEST_SUITE_P(convolution_grouped_fsv4_fsv16,
TestParamType_grouped_convolution_gpu(3, 1, 1, 80, 252, 3, 1, 1, 4, 1, 1, false, false, false, format::b_fs_yx_fsv4, ""),
TestParamType_grouped_convolution_gpu(3, 1, 1, 80, 252, 3, 1, 1, 4, 1, 1, false, true, false, format::b_fs_yx_fsv4, ""),
TestParamType_grouped_convolution_gpu(3, 1, 1, 80, 252, 3, 1, 1, 4, 1, 1, true, false, false, format::b_fs_yx_fsv4, ""),

// TODO: It will be fix soon, test reference is wrong in new driver.
// TestParamType_grouped_convolution_gpu(3, 1, 1, 80, 252, 3, 1, 1, 4, 1, 1, true, true, false, format::b_fs_yx_fsv4, ""),
TestParamType_grouped_convolution_gpu(3, 1, 1, 80, 252, 3, 1, 1, 4, 1, 1, true, true, false, format::b_fs_yx_fsv4, ""),
TestParamType_grouped_convolution_gpu(3, 1, 1, 80, 252, 3, 1, 1, 4, 1, 1, true, false, true, format::b_fs_yx_fsv4, ""),

// Format: b_fs_yx_fsv16
Expand Down

0 comments on commit 66355ec

Please sign in to comment.