-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Op][Internal][GPU] SwiGLU op internal common #27579
Conversation
src/plugins/intel_gpu/src/kernel_selector/kernels/swiglu/swiglu_kernel_base.h
Show resolved
Hide resolved
src/plugins/intel_gpu/src/kernel_selector/kernels/swiglu/swiglu_kernel_base.h
Show resolved
Hide resolved
public: | ||
OPENVINO_OP("SwiGLU", "gpu_opset"); | ||
OPENVINO_OP("SwiGLU", "ie_internal_opset"); |
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.
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?
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.
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:
- Move the SwiGLU op as is
- Rename the op
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.
Ticket number to rename the Swiglu (157623).
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.
PR renaming SwiGLU to GLU:
@@ -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) |
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.
Needed for visibility of ov_ops/swiglu.hpp in
openvino/src/plugins/intel_gpu/src/kernel_selector/kernels/swiglu/swiglu_kernel_base.h
Line 9 in 7566bc9
#include "ov_ops/swiglu.hpp" |
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.
LGTM
### 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
### 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
### 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
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
openvino/src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt
Line 78 in 7566bc9
ov_ops/swiglu.hpp
inopenvino/src/plugins/intel_gpu/src/kernel_selector/kernels/swiglu/swiglu_kernel_base.h
Line 9 in 7566bc9
Tickets for follow ups: 157623, 157615.
Tickets: