diff --git a/impl/kfc/kernel_kfc.h b/impl/kfc/kernel_kfc.h index 147a9bf13e15e59fc3b8ee65736e4162bce5e70a..b11e3bbe6bfcf0db731358bb010ab6df22e2869d 100644 --- a/impl/kfc/kernel_kfc.h +++ b/impl/kfc/kernel_kfc.h @@ -38,7 +38,7 @@ __aicore__ inline void clearWorkspace(__gm__ uint8_t *workspace) AscendC::ClearWorkspaceImpl(workspace); AscendC::NotifyEvent(WORKSPACE_SYNC_ID); } else { - AscendC::AscendCUtils::SetMask((uint64_t)-1, (uint64_t)-1); + SetVectorMask((uint64_t)-1, (uint64_t)-1); AscendC::SetMaskNorm(); } #endif diff --git a/impl/normalization/deepnorm/deepnorm_common_impl.h b/impl/normalization/deepnorm/deepnorm_common_impl.h index 33d3f8d8de08f38d8bc99ff5698f27f9b7e86657..fbb10ca223bf594ed117343196801a5a066ace35 100644 --- a/impl/normalization/deepnorm/deepnorm_common_impl.h +++ b/impl/normalization/deepnorm/deepnorm_common_impl.h @@ -38,8 +38,8 @@ __aicore__ inline bool IsDeepNormParamValid(DeepNormTiling& tiling) const bool bsDivBy8 = ((tiling.bLength * tiling.sLength) % BASIC_BLOCK_BSLENGTH == 0); if constexpr (isBasicBlock) { ASCENDC_ASSERT(hDivBy64 && bsDivBy8, - {KERNEL_LOG(KERNEL_ERROR, "In DeepNorm, when isBasicBlock is true, input must have hLength % 64 = 0, " \ - "originalHLegnth % 64 = 0 and (bLength * sLength) % 8 = 0 !");}); + {KERNEL_LOG(KERNEL_ERROR, "In DeepNorm, when isBasicBlock is true, input must have hLength %% 64 = 0, " \ + "originalHLegnth %% 64 = 0 and (bLength * sLength) % 8 = 0 !");}); } return true; diff --git a/impl/normalization/layernorm/layernorm_common_impl.h b/impl/normalization/layernorm/layernorm_common_impl.h index ae1aab74595bbc65981eb38c024fd4bbea8666ab..2ec5cd5fe0d1cb5948a35a3f4a662499bc3b8c79 100644 --- a/impl/normalization/layernorm/layernorm_common_impl.h +++ b/impl/normalization/layernorm/layernorm_common_impl.h @@ -466,7 +466,7 @@ __aicore__ inline void WelfordUpdateImpl(const LocalTensor& outputMean, const }); ASCENDC_ASSERT((para.abComputeLength > 0), { KERNEL_LOG(KERNEL_ERROR, - "Failed to check para.abComputeLength, para.abComputeLength should be greater than 0.", + "Failed to check para.abComputeLength, para.abComputeLength (%u) should be greater than 0.", para.abComputeLength, para.abLength); }); ASCENDC_ASSERT((para.rnLength == 1), { diff --git a/impl/normalization/welfordfinalize/welfordfinalize_common_impl.h b/impl/normalization/welfordfinalize/welfordfinalize_common_impl.h index 08d405a33ce453623f516cbeedb235eec727f063..c23609b1dc06b31fffd3571f7b0eea8c56485bf5 100644 --- a/impl/normalization/welfordfinalize/welfordfinalize_common_impl.h +++ b/impl/normalization/welfordfinalize/welfordfinalize_common_impl.h @@ -421,7 +421,7 @@ __aicore__ inline void GetWelfordFinalizeTensorInfo(const LocalTensor &st // 0x2 indicates reserving two buffers for the storage of mean and variance const uint32_t minTmpOutSize = B32_LEN * 0x2; ASCENDC_ASSERT((stackBuffer.GetSize() >= (minTmpSize + minTmpOutSize)), - { KERNEL_LOG(KERNEL_ERROR, "sharedTmpBuffer size must >= %d Bytes!", (minTmpSize + minTmpOutSize) * sizeof(float)); }); + { KERNEL_LOG(KERNEL_ERROR, "sharedTmpBuffer size must >= %ld Bytes!", (minTmpSize + minTmpOutSize) * sizeof(float)); }); const uint32_t expFactor = (stackBuffer.GetSize() - minTmpOutSize) / minTmpSize; tiling.computeLength = expFactor * B32_LEN; diff --git a/impl/sort/topk/topk_common_impl.h b/impl/sort/topk/topk_common_impl.h index b29b0870bcbaab897cf9cdd0f1bc63edff1f1653..45fda042b607d7bb266538a2ad7490b5a97a6fe4 100644 --- a/impl/sort/topk/topk_common_impl.h +++ b/impl/sort/topk/topk_common_impl.h @@ -123,7 +123,7 @@ __aicore__ inline void TopKNSmall(const LocalTensor &dstValueLocal, const Loc LocalTensor stackTensor; PopStackBuffer(stackTensor); ASCENDC_ASSERT((stackTensor.GetSize() / sizeof(T) >= tilling.tmpLocalSize), {KERNEL_LOG(KERNEL_ERROR, "The stack " - "buffer is insufficient, TopK api need %d, but only %d exists.", tilling.tmpLocalSize, + "buffer is insufficient, TopK api need %d, but only %ld exists.", tilling.tmpLocalSize, stackTensor.GetSize() / sizeof(T));}); stackTensor.SetSize(tilling.tmpLocalSize * sizeof(T)); diff --git a/tests/activation/sigmoid/test_operator_vec_sigmoid.cpp b/tests/activation/sigmoid/test_operator_vec_sigmoid.cpp index 4d387301a5892f088bb289e2fc2999d9e7ed3abe..7a65331fe954887b94cf858834d481225a93a2dc 100644 --- a/tests/activation/sigmoid/test_operator_vec_sigmoid.cpp +++ b/tests/activation/sigmoid/test_operator_vec_sigmoid.cpp @@ -30,14 +30,14 @@ void SigmoidKernel(__gm__ uint8_t* __restrict__ srcGm, __gm__ uint8_t* __restric tpipe.InitBuffer(tbuf2, dataSize * sizeof(T)); LocalTensor outputLocal = tbuf2.Get(); - AscendCUtils::SetMask(256); + SetVectorMask(256); DataCopy(inputLocal, inputGlobal, dataSize); event_t eventIdMTE2ToV = static_cast(GetTPipePtr()->FetchEventID(HardEvent::MTE2_V)); SetFlag(eventIdMTE2ToV); WaitFlag(eventIdMTE2ToV); - AscendCUtils::SetMask(128); + SetVectorMask(128); Sigmoid(outputLocal, inputLocal, dataSize); diff --git a/tests/math/axpy/test_operator_axpy.cpp b/tests/math/axpy/test_operator_axpy.cpp index 8a7126a17e7061da698f9c90bd3004a9164eabb1..ae348c646946f4a78c6ee974b91b037a39b9a35e 100644 --- a/tests/math/axpy/test_operator_axpy.cpp +++ b/tests/math/axpy/test_operator_axpy.cpp @@ -35,11 +35,11 @@ void AxpyKernel(__gm__ uint8_t* __restrict__ srcGm, __gm__ uint8_t* __restrict__ LocalTensor outputLocal = vecOutQue.AllocTensor(); LocalTensor tmpLocal = vecTmpQue.AllocTensor(); - AscendCUtils::SetMask(256); + SetVectorMask(256); DataCopy(inputLocal, inputGlobal, dataSize); SetFlag(EVENT_ID0); - AscendCUtils::SetMask(128); + SetVectorMask(128); WaitFlag(EVENT_ID0); U scalar = 4; diff --git a/tests/math/tanh/test_operator_tanh.cpp b/tests/math/tanh/test_operator_tanh.cpp index 5a3abfd45a7ca74995153c48f37609c7868ce355..cba449a5b19d612cb742458707c225c392ca3e57 100644 --- a/tests/math/tanh/test_operator_tanh.cpp +++ b/tests/math/tanh/test_operator_tanh.cpp @@ -30,12 +30,12 @@ void TanhKernel(__gm__ uint8_t* __restrict__ srcGm, __gm__ uint8_t* __restrict__ tpipe.InitBuffer(tbuf2, dataSize * sizeof(T)); LocalTensor outputLocal = tbuf2.Get(); - AscendCUtils::SetMask(256); + SetVectorMask(256); DataCopy(inputLocal, inputGlobal, dataSize); SetFlag(EVENT_ID0); - AscendCUtils::SetMask(128); + SetVectorMask(128); WaitFlag(EVENT_ID0); Tanh(outputLocal, inputLocal, dataSize); diff --git a/tests/math/xor/test_operator_xor.cpp b/tests/math/xor/test_operator_xor.cpp index edba1b78e62a67edf93c5f616f191aa554d2b2b2..b3c3daa8ede04df62b2a5a2574b5fdca9a63bcb0 100644 --- a/tests/math/xor/test_operator_xor.cpp +++ b/tests/math/xor/test_operator_xor.cpp @@ -59,13 +59,13 @@ void main_vec_xor_level2_demo(__gm__ uint8_t* __restrict__ dstGm, input1_local.SetValue(i, 1); } - AscendCUtils::SetMask(256); + SetVectorMask(256); DataCopy(input0_local, input0Global, dataSize); DataCopy(input1_local, input1Global, dataSize); SetFlag(EVENT_ID0); - AscendCUtils::SetMask(128); + SetVectorMask(128); WaitFlag(EVENT_ID0); if (testMode == NORMAL_MODE) {