-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Resolve accuracy issue from fusing prelu #29754
Changes from 2 commits
765016d
759091a
108a26e
1f81115
e613d7f
8703f66
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -527,6 +527,14 @@ class ConvActivationTestOnednn : public BaseFusingTest<conv_activation_onednn_te | |
#define CASE_CONV_ELTW_i8_4 { 1, 16, 1, 4 }, { 1, 16, 1, 2 }, { 1, 16, 1, 1 }, { 16, 16, 1, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::i8, format::b_fs_yx_fsv16, data_types::i8, format::os_is_yx_osv16_isv16, data_types::f32, format::bfyx | ||
#define CASE_CONV_ELTW_i8_5 { 1, 16, 1, 4, 1 }, { 1, 16, 1, 2, 1 }, { 1, 16, 2, 1, 1 }, { 16, 16, 1, 3, 1 }, { 1, 1, 1 }, { 0, 0, 0 }, { 1, 1, 1 }, 1, data_types::i8, format::bfzyx, data_types::i8, format::oizyx, data_types::f32, format::bfzyx | ||
|
||
#define CASE_MUL_BATCH_CONV_FP16_1 { 20, 15, 4, 5 }, { 20, 30, 2, 3 }, { 30, 15, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::f16, format::bfyx, data_types::f16, format::bfyx, data_types::f16, format::bfyx | ||
#define CASE_MUL_BATCH_CONV_FP16_2 { 32, 16, 5, 5 }, { 32, 32, 3, 3 }, { 32, 16, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::f16, format::bs_fs_yx_bsv16_fsv16, data_types::f16, format::os_is_yx_osv16_isv16, data_types::f16, format::bfyx | ||
#define CASE_MUL_BATCH_CONV_U8S8_1 { 32, 15, 4, 5 }, { 32, 30, 2, 3 }, { 30, 15, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::u8, format::bfyx, data_types::i8, format::bfyx, data_types::f32, format::bfyx | ||
#define CASE_MUL_BATCH_CONV_U8S8_2 { 20, 15, 5, 5 }, { 20, 30, 3, 3 }, { 30, 15, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::u8, format::bs_fs_yx_bsv16_fsv16, data_types::i8, format::os_is_yx_osv16_isv16, data_types::f32, format::bfyx | ||
#define CASE_MUL_BATCH_CONV_S8S8_1 { 32, 15, 4, 5 }, { 32, 30, 2, 3 }, { 30, 15, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::i8, format::bfyx, data_types::i8, format::bfyx, data_types::f32, format::bfyx | ||
#define CASE_MUL_BATCH_CONV_S8S8_2 { 20, 15, 5, 5 }, { 20, 30, 3, 3 }, { 30, 15, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::i8, format::bs_fs_yx_bsv16_fsv16, data_types::i8, format::os_is_yx_osv16_isv16, data_types::f32, format::bfyx | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please remove unused macros. |
||
|
||
|
||
/* ----------------------------------------------------------------------------------------------------- */ | ||
/* ---------------------------------------- FP32 convolution cases ------------------------------------- */ | ||
/* ----------------------------------------------------------------------------------------------------- */ | ||
|
@@ -3113,6 +3121,15 @@ INSTANTIATE_TEST_SUITE_P(fusings_gpu, conv_fp16_prelu_onednn, ::testing::ValuesI | |
convolution_test_params{ CASE_CONV_FP16_1, 2, 2, 4 }, | ||
})); | ||
|
||
INSTANTIATE_TEST_SUITE_P(fusings_gpu_multi_batch, conv_fp16_prelu_onednn, ::testing::ValuesIn(std::vector<convolution_test_params>{ | ||
convolution_test_params{ CASE_MUL_BATCH_CONV_FP16_1, 4, 4, 4 }, | ||
convolution_test_params{ CASE_MUL_BATCH_CONV_FP16_2, 4, 4, 4 }, | ||
convolution_test_params{ CASE_MUL_BATCH_CONV_U8S8_1, 4, 4, 4 }, | ||
convolution_test_params{ CASE_MUL_BATCH_CONV_U8S8_2, 4, 4, 4 }, | ||
convolution_test_params{ CASE_MUL_BATCH_CONV_S8S8_1, 4, 4, 4 }, | ||
convolution_test_params{ CASE_MUL_BATCH_CONV_S8S8_2, 4, 4, 4 }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it necessary to add such many test cases? Isn't it enough to add just one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reduced test-cases. |
||
})); | ||
|
||
class conv_int8_eltwise_onednn : public WeightsPrimitiveFusingTestOneDNN {}; | ||
TEST_P(conv_int8_eltwise_onednn, u8_eltwise_sum_out) { | ||
auto p = GetParam(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of dynamic layout
.batch()
will lead to exceptionAdditional check is required