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

[Op][Internal][GPU] SwiGLU op internal common #27579

Merged

Conversation

mitruska
Copy link
Contributor

@mitruska mitruska commented Nov 15, 2024

Details:

Tickets for follow ups: 157623, 157615.

Tickets:

  • 155542, 138911

@mitruska mitruska requested review from a team as code owners November 15, 2024 18:43
@mitruska mitruska requested review from itikhono and removed request for a team November 15, 2024 18:43
@mitruska mitruska self-assigned this Nov 15, 2024
@github-actions github-actions bot added category: GPU OpenVINO GPU plugin category: transformations OpenVINO Runtime library - Transformations labels Nov 15, 2024
public:
OPENVINO_OP("SwiGLU", "gpu_opset");
OPENVINO_OP("SwiGLU", "ie_internal_opset");
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, it is "SwiGLU" only when the activation is swish.
If the activatin is gelu, it is "GeGLU".
In gpu plugin, we added Swiglu fisrst, and then, we just did not make effort to update the op name when we newly met Geglu.
However, if we are going to add a common internal op, how about to change the name as GLU with types of swish, gelu?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've shared the same idea within the ticket (155542), so I agree the name could be aligned.

(Optional) Rename SwiGLU to more generic name like FuncGLU to avoid confusion

But to keep it simple and don't mix the changes, I would prefer to do it in the following order:

  1. Move the SwiGLU op as is
  2. Rename the op

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ticket number to rename the Swiglu (157623).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PR renaming SwiGLU to GLU:

@github-actions github-actions bot added the category: build OpenVINO cmake script / infra label Nov 18, 2024
@mitruska mitruska requested review from praasz and yeonbok November 19, 2024 11:05
@@ -75,7 +75,7 @@ if(COMMAND add_cpplint_target)
add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME})
endif()

target_link_libraries(${TARGET_NAME} PUBLIC OpenCL::OpenCL openvino::runtime)
target_link_libraries(${TARGET_NAME} PUBLIC OpenCL::OpenCL openvino::runtime PRIVATE openvino::runtime::dev)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needed for visibility of ov_ops/swiglu.hpp in

@mitruska mitruska added this to the 2025.0 milestone Nov 19, 2024
Copy link
Contributor

@dnkurek dnkurek left a comment

Choose a reason for hiding this comment

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

LGTM

@mitruska mitruska added this pull request to the merge queue Nov 21, 2024
Merged via the queue into openvinotoolkit:master with commit 477722d Nov 21, 2024
170 checks passed
@mitruska mitruska deleted the mitruska/swiglu_geglu_common branch November 21, 2024 10:27
github-merge-queue bot pushed a commit that referenced this pull request Nov 22, 2024
### Details:
- Rename internal op SwiGLU to GLU (no naming changes for GPU swiglu
kernel in this PR)
 
Current SwiGLU can be also GeGLU, it depends on the glu_type member.
It has been proposed by several people to rename this op and make the
name more generic like GLU.

Related comment:

#27579 (comment)

### Tickets:
 - 157623
NishantPrabhuFujitsu pushed a commit to NishantPrabhuFujitsu/openvino that referenced this pull request Nov 26, 2024
### Details:
- This PR makes GPU SwiGLU to be internal op and swiglu_fusion available
in common_optimizations, possible to be reused by other plugins
- Only necessary updates including style alignment, no logic or
functional changes intended, basically the op has been moved as is, to
not complicate review and avoid issues
 
- Needed to link openvino::runtime::dev
src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt
https://github.com/openvinotoolkit/openvino/blob/7566bc94c58a501389647b4cc4d7c21df311fa63/src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt#L78
for visibility of `ov_ops/swiglu.hpp` in

https://github.com/openvinotoolkit/openvino/blob/7566bc94c58a501389647b4cc4d7c21df311fa63/src/plugins/intel_gpu/src/kernel_selector/kernels/swiglu/swiglu_kernel_base.h#L9

Tickets for follow ups: 157623, 157615.

### Tickets:
 - 155542, 138911
NishantPrabhuFujitsu pushed a commit to NishantPrabhuFujitsu/openvino that referenced this pull request Nov 26, 2024
### Details:
- Rename internal op SwiGLU to GLU (no naming changes for GPU swiglu
kernel in this PR)
 
Current SwiGLU can be also GeGLU, it depends on the glu_type member.
It has been proposed by several people to rename this op and make the
name more generic like GLU.

Related comment:

openvinotoolkit#27579 (comment)

### Tickets:
 - 157623
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 category: transformations OpenVINO Runtime library - Transformations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants