matmulObj.SetLocalWorkspace有什么作用?
收藏回复举报
matmulObj.SetLocalWorkspace有什么作用?
t('forum.solved') 已解决
发表于2024-02-21 16:42:35
0 查看

在operator/MatMulLeakyReluCustomSample/FrameworkLaunch/MatmulLeakyReluCustom/op_kernel/matmul_leakyrelu_custom.cpp的MatmulLeakyKernel::Process中

if constexpr (setTmpSpace)
    {
        TBuf<> tmpMMFormatUb;
        LocalTensor<uint8_t> mmformatUb;
        pipe->InitBuffer(tmpMMFormatUb,  tiling.baseM * tiling.baseN * sizeof(cType));
        mmformatUb = tmpMMFormatUb.Get<uint8_t>(tiling.baseM * tiling.baseN * sizeof(cType));
        matmulObj.SetLocalWorkspace(mmformatUb);
    }

代码有什么作用?删掉有影响吗?

我要发帖子