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

[GPU] Support fs_b_yx_fsv32 and int8 case for pooling #27371

Merged

Conversation

kelvinchoi-intel
Copy link
Contributor

@kelvinchoi-intel kelvinchoi-intel commented Nov 1, 2024

Details:

  • Support fs_b_yx_fsv32 and int8 case for pooling

Tickets:

  • 157507

@kelvinchoi-intel kelvinchoi-intel requested review from a team as code owners November 1, 2024 08:44
@github-actions github-actions bot added the category: GPU OpenVINO GPU plugin label Nov 1, 2024
@@ -9,6 +9,8 @@ ParamsKey PoolingKernelGPURef::GetSupportedKey() const {
ParamsKey k;
k.EnableInputDataType(Datatype::F16);
k.EnableInputDataType(Datatype::F32);
k.EnableInputDataType(Datatype::UINT8);
k.EnableInputDataType(Datatype::INT8);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you explain why we need to support int8 from pooling_ref? Reference kernel does not provide good performance. If fs_b_yx_fsv32 is the problem, could you check why this format is chosen?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fs_b_yx_fsv32 format and int8 input type is required on 4 E2E tests, TF_frozen_model_inception_v3_w_sym_ch_a_asym_t_acc1_78_34_INT8, TF_frozen_model_mobilenet_v2_w_sym_ch_a_asym_t_acc1_71_99_INT8, TF_Mobile_Object_Labeler_v1, TF_AiyVisionClassifier_Plants.

I've updated supporting fs_b_yx_fsv32 format on Pooling Int8Ref kernel instead of supporting it on ref kernel.

@kelvinchoi-intel kelvinchoi-intel changed the title [GPU] Add int8 input type for pooling ref kernel to cover fs_b_yx_fsv32 and int8 case [GPU] Support fs_b_yx_fsv32 and int8 case for pooling Nov 27, 2024
ASSERT_EQ(ref_data[i], float(output_ptr[i]));
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we must have similar test for other layouts. It would be better to reuse existing case. or can you generalize the existing case to cover this layout too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added more unittests

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have similar test case that can cover this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The added unittests are copied from f16/f32 fs_b_yx_fsv32 cases. If there was any tests to cover int8/f32 fs_b_yx_fsv32 pooling cases, the tests would be failed.
If you have any cases considering, please let me know.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my suggestion is to review whether there is similar test case that exists already. If we already have similar case, we can merge this test into the existing one. Did you already review whether we have similar case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added "fs_b_yx_fsv32" format on top of existing low precision test, and deleted my previous tests.

@kelvinchoi-intel kelvinchoi-intel force-pushed the support_pooling_ref_int8 branch 2 times, most recently from 8c7cb62 to b78bef0 Compare December 3, 2024 08:12
@@ -2197,7 +2197,8 @@ INSTANTIATE_TEST_SUITE_P(
format::bfyx,
format::b_fs_yx_fsv4,
format::b_fs_yx_fsv16,
format::b_fs_yx_fsv32)),
format::b_fs_yx_fsv32,
format::fs_b_yx_fsv32)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how many test case does this create? I'm afraid this will generate too much case for rare usage. I'd suggest to introduce separate test instantiation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated tests with separate test instantiation. 16 tests and 0.2 sec to run this.

@kelvinchoi-intel kelvinchoi-intel force-pushed the support_pooling_ref_int8 branch from b78bef0 to 247a48a Compare December 4, 2024 06:54
@isanghao isanghao enabled auto-merge December 4, 2024 07:05
@isanghao isanghao added this pull request to the merge queue Dec 4, 2024
Merged via the queue into openvinotoolkit:master with commit 5cd59b8 Dec 4, 2024
155 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: GPU OpenVINO GPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants