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

Implement rotary_embedding for Ascend #753

Merged

Conversation

jfxu-st
Copy link
Contributor

@jfxu-st jfxu-st commented Dec 19, 2023

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation and Context

The rotary_embedding op is not implemented on Ascend.

Description

Implement rotary_embedding for Ascend

Use cases (Optional)

BC-breaking (Optional)

Checklist

Before PR:

  • I have read and followed the workflow indicated in the Contributors.md to create this PR.
  • Pre-commit or linting tools indicated in Contributors.md are used to fix the potential lint issues.
  • Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
  • New functionalities are covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

  • CLA has been signed and all committers have signed the CLA in this PR.

@jfxu-st jfxu-st marked this pull request as ready for review December 19, 2023 12:01
namespace OP_IMPL_NS {

DIOPI_API diopiError_t diopiRotaryEmbedding(diopiContextHandle_t ctx, diopiTensorHandle_t out, diopiConstTensorHandle_t x, diopiConstTensorHandle_t cos,
diopiConstTensorHandle_t sin, const bool conj, const bool interleaved) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

对interleaved做一次检查,对不满足的情况,打个报错日志。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

对interleaved做一次检查,对不满足的情况,打个报错日志。

Done

@yangbofun yangbofun merged commit 2589ad4 into DeepLink-org:main Dec 20, 2023
17 checks passed
@yangbofun yangbofun deleted the jfxu/add_ascend_rotary_embedding branch December 20, 2023 06:49
@jfxu-st jfxu-st added the ascend label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants