From ecd08c2d4f244cac303b57b712ca0801cc65dfaa Mon Sep 17 00:00:00 2001 From: jiangchengcheng-on Date: Wed, 7 Aug 2024 03:43:37 +0000 Subject: [PATCH] fix namespace using error Signed-off-by: jiangchengcheng-on --- .../op_kernel/matmul_custom.cpp | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/operator/MatMulCustomSample/FrameworkLaunch/MatmulCustomMultiCore/op_kernel/matmul_custom.cpp b/operator/MatMulCustomSample/FrameworkLaunch/MatmulCustomMultiCore/op_kernel/matmul_custom.cpp index f9cb479cc..3aba21bcb 100644 --- a/operator/MatMulCustomSample/FrameworkLaunch/MatmulCustomMultiCore/op_kernel/matmul_custom.cpp +++ b/operator/MatMulCustomSample/FrameworkLaunch/MatmulCustomMultiCore/op_kernel/matmul_custom.cpp @@ -9,8 +9,6 @@ */ #include "kernel_operator.h" #include "lib/matmul_intf.h" - -using namespace AscendC; using namespace matmul; template class MatmulKernel { @@ -23,14 +21,14 @@ public: __aicore__ inline void CalcOffset(int32_t blockIdx, const TCubeTiling &tiling, int32_t &offsetA, int32_t &offsetB, int32_t &offsetC, int32_t &offsetBias); - Matmul, MatmulType, - MatmulType, MatmulType> - matmulObj; + Matmul, MatmulType, MatmulType, + MatmulType> matmulObj; - GlobalTensor aGlobal; - GlobalTensor bGlobal; - GlobalTensor cGlobal; - GlobalTensor biasGlobal; + AscendC::GlobalTensor aGlobal; + AscendC::GlobalTensor bGlobal; + AscendC::GlobalTensor cGlobal; + AscendC::GlobalTensor biasGlobal; TCubeTiling tiling; }; @@ -63,8 +61,8 @@ template __aicore__ inline void MatmulKernel::Process(TPipe *pipe) { if constexpr (setTmpSpace) { - TBuf<> tmpMMFormatUb; - LocalTensor mmformatUb; + AscendC::TBuf<> tmpMMFormatUb; + AscendC::LocalTensor mmformatUb; pipe->InitBuffer(tmpMMFormatUb, TOTAL_VEC_LOCAL_SIZE); mmformatUb = tmpMMFormatUb.Get(TOTAL_VEC_LOCAL_SIZE); matmulObj.SetLocalWorkspace(mmformatUb); @@ -97,7 +95,7 @@ extern "C" __global__ __aicore__ void matmul_custom(GM_ADDR a, GM_ADDR b, GM_ADD { GET_TILING_DATA(tilingData, tiling); MatmulKernel matmulKernel; - TPipe pipe; + AscendC::TPipe pipe; REGIST_MATMUL_OBJ(&pipe, GetSysWorkSpacePtr(), matmulKernel.matmulObj, &tilingData.cubeTilingData); matmulKernel.Init(a, b, bias, c, workspace, tilingData.cubeTilingData); if (TILING_KEY_IS(1)) { -- Gitee