Skip to content

Commit

Permalink
clang-format the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Wrench-Git committed Nov 18, 2024
1 parent 52de8eb commit 164ff29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions impl/torch/functions/functions_ext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ diopiError_t diopiRotaryEmbedding(diopiContextHandle_t ctx, diopiTensorHandle_t
return diopiSuccess;
}

diopiError_t diopiApplyRotary(diopiContextHandle_t ctx, diopiTensorHandle_t out1, diopiTensorHandle_t out2, diopiConstTensorHandle_t x1, diopiConstTensorHandle_t x2, diopiConstTensorHandle_t cos,
diopiConstTensorHandle_t sin, const bool conj, const bool interleaved=false) {
diopiError_t diopiApplyRotary(diopiContextHandle_t ctx, diopiTensorHandle_t out1, diopiTensorHandle_t out2, diopiConstTensorHandle_t x1,
diopiConstTensorHandle_t x2, diopiConstTensorHandle_t cos, diopiConstTensorHandle_t sin, const bool conj,
const bool interleaved = false) {
if (interleaved) {
set_last_error_string("interleaved rotary embedding is not supported yet");
return diopiNoImplement;
Expand Down
5 changes: 3 additions & 2 deletions proto/include/diopi/functions_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ DIOPI_API diopiError_t diopiRotaryEmbedding(diopiContextHandle_t ctx, diopiTenso
* - When set to `false`, rotary embedding is applied by splitting 'x' in half and separately applying sine and cosine to each half.
* - When set to `true`, rotary embedding is applied by pairing every two elements in 'x' and applying sine and cosine to each pair.
*/
DIOPI_API diopiError_t diopiApplyRotary(diopiContextHandle_t ctx, diopiTensorHandle_t out1, diopiTensorHandle_t out2, diopiConstTensorHandle_t x1, diopiConstTensorHandle_t x2, diopiConstTensorHandle_t cos,
diopiConstTensorHandle_t sin, const bool conj, const bool interleaved);
DIOPI_API diopiError_t diopiApplyRotary(diopiContextHandle_t ctx, diopiTensorHandle_t out1, diopiTensorHandle_t out2, diopiConstTensorHandle_t x1,
diopiConstTensorHandle_t x2, diopiConstTensorHandle_t cos, diopiConstTensorHandle_t sin, const bool conj,
const bool interleaved);

/**
* @brief Apply Root Mean Square (RMS) Normalization to the input tensor.
Expand Down

0 comments on commit 164ff29

Please sign in to comment.