[SYCLomatic] Enable migration for CUBLASLT_EPILOGUE_DGELU & EPILOGUE_BGRADB#2449
Closed
abhilash1910 wants to merge 2 commits intooneapi-src:SYCLomaticfrom
Closed
[SYCLomatic] Enable migration for CUBLASLT_EPILOGUE_DGELU & EPILOGUE_BGRADB#2449abhilash1910 wants to merge 2 commits intooneapi-src:SYCLomaticfrom
abhilash1910 wants to merge 2 commits intooneapi-src:SYCLomaticfrom
Conversation
zhiweij1
reviewed
Nov 6, 2024
| float alpha, float beta) { | ||
|
|
||
| auto alg = ::dnnl::algorithm::eltwise_gelu_erf; | ||
| const memory_desc_ext &dst_desc = new memory_desc_ext(); |
Contributor
There was a problem hiding this comment.
where to "delete" dst_desc and src_desc?
zhiweij1
reviewed
Nov 6, 2024
zhiweij1
reviewed
Nov 6, 2024
|
|
||
| template <typename primitive_type, typename... args_type> | ||
| inline | ||
| typename primitive_type::primitive_desc dgelu_epilogue_( |
Contributor
There was a problem hiding this comment.
The function name looks like a type name, please refine it.
zhiweij1
reviewed
Nov 6, 2024
| const memory_desc_ext &dst_desc = new memory_desc_ext(); | ||
| const memory_desc_ext &src_desc = new memory_desc_ext(); | ||
| return create_primitive_desc<primitive_type>( | ||
| ::dnnl::prop_kind::backward, alg, src_desc.get_desc(), |
Contributor
There was a problem hiding this comment.
For src_desc and dst_desc, is it OK to pass to the create_primitive_desc directly?
No need to fill data?
zhiweij1
reviewed
Nov 6, 2024
zhiweij1
reviewed
Nov 6, 2024
zhiweij1
reviewed
Nov 6, 2024
zhiweij1
reviewed
Nov 6, 2024
zhiweij1
reviewed
Nov 6, 2024
zhiweij1
reviewed
Nov 6, 2024
zhiweij1
reviewed
Nov 6, 2024
zhiweij1
reviewed
Nov 28, 2024
Contributor
zhiweij1
left a comment
There was a problem hiding this comment.
Please submit E2E test PR first.
zhiweij1
reviewed
Dec 4, 2024
Comment on lines
+235
to
+255
| typename primitive_type::primitive_desc sync_gelu_backward( | ||
| float alpha, float beta, const::dnnl::memory_desc_ext &src_desc, | ||
| const ::dnnl::memory_desc_ext &dest_desc) { | ||
|
|
||
| auto alg = ::dnnl::algorithm::eltwise_gelu_erf; | ||
| return create_primitive_desc<primitive_type>( | ||
| ::dnnl::prop_kind::backward, alg, src_desc.get_desc(), | ||
| dst_desc.get_desc(), alpha, beta); | ||
| } | ||
|
|
||
| template <typename primitive_type, typename... args_type> | ||
| inline | ||
| typename primitive_type::primitive_desc bias_backward( | ||
| float alpha, float beta, const dnnl::memory_desc_ext &src_desc, | ||
| const ::dnnl::memory_desc_ext &dest_desc) { | ||
|
|
||
| auto alg = ::dnnl::algorithm::reduction_sum; | ||
| return create_primitive_desc<primitive_type>( | ||
| ::dnnl::prop_kind::backward, alg, src_desc.get_desc(), | ||
| dst_desc.get_desc(), alpha, beta); | ||
| } |
Contributor
There was a problem hiding this comment.
For backward primitives, it needs a forward primitive object as a constructor argument. https://github.com/oneapi-src/oneDNN/blob/main/include/oneapi/dnnl/dnnl.hpp#L7476
Contributor
Author
|
Transfer to @zhiweij1 . Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@zhiweij1 @zhimingwang36
(WIP)