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] POC for new OCL kernels approach #26985

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

vladimir-paramuzov
Copy link
Contributor

@vladimir-paramuzov vladimir-paramuzov commented Oct 10, 2024

Details:

  • Currently we have separate kernel selector component with independent API and kernels list which leads to some data structures conversion overheads and it doesn't allow to have unified kernel selection logic. So the goals of this change are:
    • Make OCL jitters work with common primitive/layout descriptors
    • Have better multi-kernel impls design
    • Allow registration of OCL impls in the common impls list
    • Use ImplementationManager to check applicability of individual OCL impl
  • In the scope of this PR few impls are updated: CM LSTM kernel (and removed old infra) and CTC Loss kernel from OCL
  • Enable clang-format for the updated backends

@vladimir-paramuzov vladimir-paramuzov added WIP work in progress no_stale Do not mark as stale labels Oct 10, 2024
@vladimir-paramuzov vladimir-paramuzov requested review from a team as code owners October 10, 2024 07:14
@github-actions github-actions bot added the category: GPU OpenVINO GPU plugin label Oct 10, 2024
@vladimir-paramuzov vladimir-paramuzov requested a review from a team as a code owner February 12, 2025 11:44
@github-actions github-actions bot added the category: build OpenVINO cmake script / infra label Feb 12, 2025
@vladimir-paramuzov vladimir-paramuzov force-pushed the new_ocl_impls branch 3 times, most recently from b50626a to 81014d2 Compare March 6, 2025 10:34
@vladimir-paramuzov vladimir-paramuzov removed the WIP work in progress label Mar 6, 2025
@vladimir-paramuzov vladimir-paramuzov force-pushed the new_ocl_impls branch 2 times, most recently from fc80b87 to d3d6913 Compare March 7, 2025 06:21
@@ -0,0 +1,270 @@
// Copyright (C) 2023 Intel Corporation
Copy link
Contributor

@yeonbok yeonbok Mar 7, 2025

Choose a reason for hiding this comment

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

random spot:
It is little bit not intuitive for me that the kernels_cache & header cl kernels are under impls, while the cl kernels are under kernels_selector directory, and impls and kernels_cache are in the same hierarchy..
(also there are header cl kernels under kernels_selector directory) ..
What was the main idea of the new directory construction? Could you add some comment regarding the criteria?

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 main idea is that backend specific code should be located in impls/${backend_name} folder. headers for kernel selector are in kernel selector still (those are duplicated for now to avoid any dependencies between components). Kernel selector shall be removed in the future, so the whole structure of ocl backend will look like ocl_v2 version

LSTMImpl() : PrimitiveImplOCL(LSTMSeqImplementationManager::get_type_info_static()) {}
LSTMImpl(const program_node& node, const kernel_impl_params& params) : LSTMImpl() {
add_stage(lstm_loop, params);
add_stage(lstm_gemm, params);
Copy link
Contributor

Choose a reason for hiding this comment

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

GEMM kernel should be executed before loop kernel here.

Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
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: GPU OpenVINO GPU plugin no_stale Do not mark as stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants