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

[CPU] Optimize forked onednn binary size via removing gemm legacy above avx2. #19867

Closed

Conversation

luweizhou2016
Copy link
Contributor

@luweizhou2016 luweizhou2016 commented Sep 15, 2023

Details:

  • Fix RNN brgemm limitation
  • Fix reshape+FC limitation on inner product
  • Remove legacy gemm on ISAs above avx2
  • Enforce jit_gemm avx512 fall back jit_gemm avx2

Tickets:

@luweizhou2016 luweizhou2016 requested review from a team as code owners September 15, 2023 07:52
@github-actions github-actions bot added category: CPU OpenVINO CPU plugin category: build OpenVINO cmake script / infra labels Sep 15, 2023
@luweizhou2016 luweizhou2016 changed the title Luwei/reduce fork [TEST]Luwei/reduce fork Sep 15, 2023
@luweizhou2016 luweizhou2016 requested a review from a team as a code owner September 18, 2023 03:16
@github-actions github-actions bot added the category: ONNX FE OpenVINO ONNX FrontEnd label Sep 18, 2023
@github-actions github-actions bot removed the category: ONNX FE OpenVINO ONNX FrontEnd label Nov 2, 2023
@luweizhou2016 luweizhou2016 changed the title [TEST]Luwei/reduce fork Luwei/reduce fork Nov 2, 2023
@luweizhou2016 luweizhou2016 changed the title Luwei/reduce fork [CPU] Optimize forked onednn binary size via removing gemm legacy above avx2. Nov 2, 2023
@luweizhou2016
Copy link
Contributor Author

ONEDNN PR openvinotoolkit/oneDNN#219

@luweizhou2016
Copy link
Contributor Author

Seems dien function regression hit CI test with ENALBE_LTO=ON.

@@ -13,6 +13,8 @@ endif()

if(ENABLE_LTO)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
#Only build gemm driver for AVX2 and below ISAs
set(ONEDNN_ENABLE_GEMM_KERNELS_ISA "AVX2" CACHE STRING "" FORCE)
Copy link
Contributor

@dmitry-gorokhov dmitry-gorokhov Nov 2, 2023

Choose a reason for hiding this comment

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

We need to disable avx512 gemm in any case, not only ENABLE_LTO build

@dmitry-gorokhov
Copy link
Contributor

@EgorDuplensky please review as well

@luweizhou2016 luweizhou2016 force-pushed the luwei/reduce_fork branch 2 times, most recently from 4525bf0 to 340522e Compare November 15, 2023 08:17
@luweizhou2016
Copy link
Contributor Author

Only have 3MB gain. Will not merge after dicussing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: build OpenVINO cmake script / infra category: CPU OpenVINO CPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants