Skip to content

Commit f8a3368

Browse files
committed
fix format
Signed-off-by: Ceng23333 <441651826@qq.com>
1 parent a52e426 commit f8a3368

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/infiniop/ops/simple_gla_attention/cpu/simple_gla_attention_cpu.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "simple_gla_attention_cpu.h"
2+
#include "../../../../utils.h"
23
#include "../../../handle.h"
34
#include "../../../tensor.h"
4-
#include "../../../../utils.h"
55

66
#include <cmath>
77
#include <vector>

src/infiniop/ops/simple_gla_attention/operator.cc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ __INFINI_C infiniStatus_t infiniopCreateSimpleGLAAttentionDescriptor(
1616
infiniopTensorDescriptor_t v_desc,
1717
infiniopTensorDescriptor_t g_gamma_desc) {
1818

19-
#define CREATE_CPU(CASE) \
20-
case CASE: \
21-
return op::simple_gla_attention::cpu::Descriptor::create( \
22-
handle, \
23-
reinterpret_cast<op::simple_gla_attention::cpu::Descriptor **>(desc_ptr), \
19+
#define CREATE_CPU(CASE) \
20+
case CASE: \
21+
return op::simple_gla_attention::cpu::Descriptor::create( \
22+
handle, \
23+
reinterpret_cast<op::simple_gla_attention::cpu::Descriptor **>(desc_ptr), \
2424
out_desc, q_desc, k_desc, v_desc, g_gamma_desc)
2525

2626
switch (handle->device) {
@@ -51,9 +51,9 @@ __INFINI_C infiniStatus_t infiniopGetSimpleGLAAttentionWorkspaceSize(
5151
infiniopSimpleGLAAttentionDescriptor_t desc,
5252
size_t *size) {
5353

54-
#define WS_CPU(CASE) \
55-
case CASE: \
56-
*size = reinterpret_cast<op::simple_gla_attention::cpu::Descriptor *>(desc)->workspaceSize(); \
54+
#define WS_CPU(CASE) \
55+
case CASE: \
56+
*size = reinterpret_cast<op::simple_gla_attention::cpu::Descriptor *>(desc)->workspaceSize(); \
5757
return INFINI_STATUS_SUCCESS
5858

5959
switch (desc->device_type) {
@@ -86,9 +86,9 @@ __INFINI_C infiniStatus_t infiniopSimpleGLAAttention(
8686
float scale,
8787
void *stream) {
8888

89-
#define CALC_CPU(CASE) \
90-
case CASE: \
91-
return reinterpret_cast<op::simple_gla_attention::cpu::Descriptor *>(desc) \
89+
#define CALC_CPU(CASE) \
90+
case CASE: \
91+
return reinterpret_cast<op::simple_gla_attention::cpu::Descriptor *>(desc) \
9292
->calculate(workspace, workspace_size, out, q, k, v, g_gamma, scale, stream)
9393

9494
switch (desc->device_type) {
@@ -121,9 +121,9 @@ __INFINI_C infiniStatus_t infiniopSimpleGLAAttention(
121121
__INFINI_C infiniStatus_t infiniopDestroySimpleGLAAttentionDescriptor(
122122
infiniopSimpleGLAAttentionDescriptor_t desc) {
123123

124-
#define DESTROY_CPU(CASE) \
125-
case CASE: \
126-
delete reinterpret_cast<op::simple_gla_attention::cpu::Descriptor *>(desc); \
124+
#define DESTROY_CPU(CASE) \
125+
case CASE: \
126+
delete reinterpret_cast<op::simple_gla_attention::cpu::Descriptor *>(desc); \
127127
return INFINI_STATUS_SUCCESS
128128

129129
switch (desc->device_type) {

0 commit comments

Comments
 (0)