From 6b3991312aa72fe138f997666fe4108c1e12784f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=97=AD?= Date: Fri, 7 Nov 2025 16:05:20 +0800 Subject: [PATCH] high api rename --- .../AbsDuplicateKernelInvocation/abs_duplicate.cpp | 2 +- .../AbsPadKernelInvocation/abs_pad.cpp | 2 +- .../ReduceMinKernelInvocation/reduce_min.cpp | 2 +- .../BallQuery/op_kernel/ball_query_norm_fp16.h | 8 ++++---- .../BallQuery/op_kernel/ball_query_norm_fp32_perf.h | 8 ++++---- .../BallQuery/op_kernel/ball_query_stack.h | 8 ++++---- .../op_kernel/flash_attention_score_common.h | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsDuplicateKernelInvocation/abs_duplicate.cpp b/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsDuplicateKernelInvocation/abs_duplicate.cpp index 131640e43..c54c398ff 100644 --- a/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsDuplicateKernelInvocation/abs_duplicate.cpp +++ b/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsDuplicateKernelInvocation/abs_duplicate.cpp @@ -23,7 +23,7 @@ public: srcGlobal.SetGlobalBuffer((__gm__ half *)(inputGM) + BLOCK_LENGTH * AscendC::GetBlockIdx(), BLOCK_LENGTH); dstGlobal.SetGlobalBuffer((__gm__ half *)(outputGM) + BLOCK_LENGTH * AscendC::GetBlockIdx(), blockLength); syncGlobal.SetGlobalBuffer((__gm__ int32_t *)(syncGM), USE_CORE_NUM * DEFAULT_SYNCALL_NEED_SIZE); - AscendC::InitGlobalMemory(dstGlobal, blockLength, 0); + AscendC::Fill(dstGlobal, blockLength, 0); pipe.InitBuffer(inQueue, BUFFER_NUM, BLOCK_GROUP_NUM * BLOCKLEN_CEIL * sizeof(half)); pipe.InitBuffer(outQueue, BUFFER_NUM, BLOCK_GROUP_NUM * BLOCKLEN_CEIL * sizeof(half)); diff --git a/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsPadKernelInvocation/abs_pad.cpp b/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsPadKernelInvocation/abs_pad.cpp index 70c5c5113..bb4d29781 100644 --- a/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsPadKernelInvocation/abs_pad.cpp +++ b/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsPadKernelInvocation/abs_pad.cpp @@ -31,7 +31,7 @@ public: dstGlobal.SetGlobalBuffer((__gm__ half *)(outputGM) + BLOCK_LENGTH * AscendC::GetBlockIdx(), BLOCK_LENGTH); pipe.InitBuffer(inQueue, BUFFER_NUM, BLOCK_GROUP_NUM * BLOCKLEN_CEIL * sizeof(half)); pipe.InitBuffer(outQueue, BUFFER_NUM, BLOCK_GROUP_NUM * BLOCKLEN_CEIL * sizeof(half)); - AscendC::InitGlobalMemory(dstGlobal, BLOCK_LENGTH, half(0.0)); + AscendC::Fill(dstGlobal, BLOCK_LENGTH, half(0.0)); } __aicore__ inline void Process() { diff --git a/operator/ascendc/0_introduction/17_unaligned_reducemin_kernellaunch/ReduceMinKernelInvocation/reduce_min.cpp b/operator/ascendc/0_introduction/17_unaligned_reducemin_kernellaunch/ReduceMinKernelInvocation/reduce_min.cpp index 19c9425d0..b58b05f35 100644 --- a/operator/ascendc/0_introduction/17_unaligned_reducemin_kernellaunch/ReduceMinKernelInvocation/reduce_min.cpp +++ b/operator/ascendc/0_introduction/17_unaligned_reducemin_kernellaunch/ReduceMinKernelInvocation/reduce_min.cpp @@ -23,7 +23,7 @@ public: dstGlobal.SetGlobalBuffer((__gm__ half *)(outputGM) + BLOCK_LENGTH * AscendC::GetBlockIdx(), blockLength); syncGlobal.SetGlobalBuffer((__gm__ int32_t *)(syncGM), USE_CORE_NUM * DEFAULT_SYNCALL_NEED_SIZE); // clear dstGm before doing calculations - AscendC::InitGlobalMemory(dstGlobal, blockLength, 0); + AscendC::Fill(dstGlobal, blockLength, 0); pipe.InitBuffer(inQueue, BUFFER_NUM, BLOCK_GROUP_NUM * BLOCKLEN_CEIL * sizeof(half)); pipe.InitBuffer(outQueue, BUFFER_NUM, BLOCK_GROUP_NUM * BLOCKLEN_CEIL * sizeof(half)); diff --git a/operator_contrib/BallQuerySample/FrameworkLaunch/BallQuery/op_kernel/ball_query_norm_fp16.h b/operator_contrib/BallQuerySample/FrameworkLaunch/BallQuery/op_kernel/ball_query_norm_fp16.h index 108e986e0..1b6050ed7 100644 --- a/operator_contrib/BallQuerySample/FrameworkLaunch/BallQuery/op_kernel/ball_query_norm_fp16.h +++ b/operator_contrib/BallQuerySample/FrameworkLaunch/BallQuery/op_kernel/ball_query_norm_fp16.h @@ -164,10 +164,10 @@ private: idxTmp1 = idxSeqN[align32N]; idxTmp2 = idxTmp1[align32N]; - ArithProgression(idxSeq0, 0, int32_t(dim3 * sizeof(T)), maxNM); - ArithProgression(idxSeq1, int32_t(sizeof(T)), int32_t(dim3 * sizeof(T)), maxNM); - ArithProgression(idxSeq2, int32_t(sizeof(T) + sizeof(T)), int32_t(dim3 * sizeof(T)), maxNM); - ArithProgression(idxSeqN, 0, 1, N); + Arange(idxSeq0, 0, int32_t(dim3 * sizeof(T)), maxNM); + Arange(idxSeq1, int32_t(sizeof(T)), int32_t(dim3 * sizeof(T)), maxNM); + Arange(idxSeq2, int32_t(sizeof(T) + sizeof(T)), int32_t(dim3 * sizeof(T)), maxNM); + Arange(idxSeqN, 0, 1, N); } __aicore__ inline void MaskInit(){ diff --git a/operator_contrib/BallQuerySample/FrameworkLaunch/BallQuery/op_kernel/ball_query_norm_fp32_perf.h b/operator_contrib/BallQuerySample/FrameworkLaunch/BallQuery/op_kernel/ball_query_norm_fp32_perf.h index a397fa9f1..77fd39869 100644 --- a/operator_contrib/BallQuerySample/FrameworkLaunch/BallQuery/op_kernel/ball_query_norm_fp32_perf.h +++ b/operator_contrib/BallQuerySample/FrameworkLaunch/BallQuery/op_kernel/ball_query_norm_fp32_perf.h @@ -165,10 +165,10 @@ private: idxTmp1 = idxSeqN[alignFP32N]; idxTmp2 = idxTmp1[alignFP32N]; - ArithProgression(idxSeq0, 0, dim3 * sizeof(half), N); - ArithProgression(idxSeq1, sizeof(half), dim3 * sizeof(half), N); - ArithProgression(idxSeq2, sizeof(half) + sizeof(half), dim3 * sizeof(half), N); - ArithProgression(idxSeqN, 0, 1, N); + Arange(idxSeq0, 0, dim3 * sizeof(half), N); + Arange(idxSeq1, sizeof(half), dim3 * sizeof(half), N); + Arange(idxSeq2, sizeof(half) + sizeof(half), dim3 * sizeof(half), N); + Arange(idxSeqN, 0, 1, N); } __aicore__ inline void MaskInit(){ diff --git a/operator_contrib/BallQuerySample/FrameworkLaunch/BallQuery/op_kernel/ball_query_stack.h b/operator_contrib/BallQuerySample/FrameworkLaunch/BallQuery/op_kernel/ball_query_stack.h index 2cf49d817..a4ed6eaa1 100644 --- a/operator_contrib/BallQuerySample/FrameworkLaunch/BallQuery/op_kernel/ball_query_stack.h +++ b/operator_contrib/BallQuerySample/FrameworkLaunch/BallQuery/op_kernel/ball_query_stack.h @@ -128,10 +128,10 @@ private: LocalTensor idxSeqN = idxSeq2[maxNM]; LocalTensor idxTmp1 = idxSeqN[align32N]; - ArithProgression(idxSeq0, 0, int32_t(sizeof(T) + sizeof(T) + sizeof(T)), maxNM); - ArithProgression(idxSeq1, int32_t(sizeof(T)), int32_t(sizeof(T) + sizeof(T) + sizeof(T)), maxNM); - ArithProgression(idxSeq2, int32_t(sizeof(T) + sizeof(T)), int32_t(sizeof(T) + sizeof(T) + sizeof(T)), maxNM); - ArithProgression(idxSeqN, 0, 1, N); + Arange(idxSeq0, 0, int32_t(sizeof(T) + sizeof(T) + sizeof(T)), maxNM); + Arange(idxSeq1, int32_t(sizeof(T)), int32_t(sizeof(T) + sizeof(T) + sizeof(T)), maxNM); + Arange(idxSeq2, int32_t(sizeof(T) + sizeof(T)), int32_t(sizeof(T) + sizeof(T) + sizeof(T)), maxNM); + Arange(idxSeqN, 0, 1, N); Gather(xyz_x, xyzLocal, idxSeq0.ReinterpretCast(), 0, N); Gather(xyz_y, xyzLocal, idxSeq1.ReinterpretCast(), 0, N); diff --git a/operator_contrib/FlashAttentionScoreSample/FrameworkLaunch/FlashAttentionScore/op_kernel/flash_attention_score_common.h b/operator_contrib/FlashAttentionScoreSample/FrameworkLaunch/FlashAttentionScore/op_kernel/flash_attention_score_common.h index aa5a6b0aa..a323274e2 100644 --- a/operator_contrib/FlashAttentionScoreSample/FrameworkLaunch/FlashAttentionScore/op_kernel/flash_attention_score_common.h +++ b/operator_contrib/FlashAttentionScoreSample/FrameworkLaunch/FlashAttentionScore/op_kernel/flash_attention_score_common.h @@ -37,7 +37,7 @@ using AscendC::Div; using AscendC::Duplicate; using AscendC::GetBlockIdx; using AscendC::RoundMode; -using AscendC::SelectWithBytesMask; +using AscendC::Select; using AscendC::SelectWithBytesMaskShapeInfo; using AscendC::SoftmaxFlashV2; using AscendC::SoftMaxShapeInfo; -- Gitee