Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef __PAGED_ATTENTION_KUNLUN_H__
#define __PAGED_ATTENTION_KUNLUN_H__

#include "../paged_attention.h"

DESCRIPTOR(kunlun)

#endif // __PAGED_ATTENTION_KUNLUN_H__
515 changes: 515 additions & 0 deletions src/infiniop/ops/paged_attention/kunlun/paged_attention_kunlun.xpu

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions src/infiniop/ops/paged_attention/operator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#ifdef ENABLE_ASCEND_API
#include "ascend/paged_attention_ascend.h"
#endif
#ifdef ENABLE_KUNLUN_API
#include "kunlun/paged_attention_kunlun.h"
#endif

__INFINI_C infiniStatus_t infiniopCreatePagedAttentionDescriptor(
infiniopHandle_t handle,
Expand Down Expand Up @@ -63,6 +66,9 @@ __INFINI_C infiniStatus_t infiniopCreatePagedAttentionDescriptor(
#endif
#ifdef ENABLE_HYGON_API
CREATE(INFINI_DEVICE_HYGON, nvidia)
#endif
#ifdef ENABLE_KUNLUN_API
CREATE(INFINI_DEVICE_KUNLUN, kunlun)
#endif
default:
return INFINI_STATUS_DEVICE_TYPE_NOT_SUPPORTED;
Expand Down Expand Up @@ -102,6 +108,9 @@ __INFINI_C infiniStatus_t infiniopGetPagedAttentionWorkspaceSize(
#endif
#ifdef ENABLE_HYGON_API
GET(INFINI_DEVICE_HYGON, nvidia)
#endif
#ifdef ENABLE_KUNLUN_API
GET(INFINI_DEVICE_KUNLUN, kunlun)
#endif
default:
return INFINI_STATUS_DEVICE_TYPE_NOT_SUPPORTED;
Expand Down Expand Up @@ -145,6 +154,9 @@ __INFINI_C infiniStatus_t infiniopPagedAttention(
#endif
#ifdef ENABLE_HYGON_API
CALCULATE(INFINI_DEVICE_HYGON, nvidia)
#endif
#ifdef ENABLE_KUNLUN_API
CALCULATE(INFINI_DEVICE_KUNLUN, kunlun)
#endif
default:
return INFINI_STATUS_DEVICE_TYPE_NOT_SUPPORTED;
Expand Down Expand Up @@ -183,6 +195,9 @@ __INFINI_C infiniStatus_t infiniopDestroyPagedAttentionDescriptor(
#endif
#ifdef ENABLE_HYGON_API
DESTROY(INFINI_DEVICE_HYGON, nvidia)
#endif
#ifdef ENABLE_KUNLUN_API
DESTROY(INFINI_DEVICE_KUNLUN, kunlun)
#endif
default:
return INFINI_STATUS_DEVICE_TYPE_NOT_SUPPORTED;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef __PAGED_ATTENTION_PREFILL_KUNLUN_H__
#define __PAGED_ATTENTION_PREFILL_KUNLUN_H__

#include "../paged_attention_prefill.h"

DESCRIPTOR(kunlun)

#endif // __PAGED_ATTENTION_PREFILL_KUNLUN_H__
Loading
Loading