不能操作workspace,errorStr: When the D-cache reads and writes data to the UB, the response value returned by the bus is a no
收藏回复举报
不能操作workspace,errorStr: When the D-cache reads and writes data to the UB, the response value returned by the bus is a no
t('forum.solved') 已解决
发表于2024-11-26 16:49:48
0 查看

平台:

modelarts cann 8.0rc3 新建的工程

tiling

static ge::graphStatus TilingFunc(gert::TilingContext* context)
{
  TestTilingData tiling;
  context->SetBlockDim(1);
  size_t *currentWorkspace = context->GetWorkspaceSizes(1);
  currentWorkspace[0] = 1024;
  tiling.SaveToBuffer(context->GetRawTilingData()->GetData(), context->GetRawTilingData()->GetCapacity());
  context->GetRawTilingData()->SetDataSize(tiling.GetDataSize());

  return ge::GRAPH_SUCCESS;
}
}

kernel

#include "kernel_operator.h"
using namespace AscendC;
extern "C" __global__ __aicore__ void test(GM_ADDR x, GM_ADDR y, GM_ADDR workspace, GM_ADDR tiling) {
    GET_TILING_DATA(tiling_data, tiling);
    GlobalTensor<int32_t> w;
    auto wptr = GetUserWorkspace(workspace);
    w.SetGlobalBuffer((__gm__ int32_t*)wptr);
    w(0) = int32_t(1);
}

算子运行报错

[INFO]  Set device[0] success
[INFO]  Get RunMode[1] success
[INFO]  Init resource success
[INFO]  Set input success
[INFO]  Copy input[0] success
[INFO]  Copy input[1] success
[INFO]  Copy input[2] success
[INFO]  Create stream success
[INFO]  Execute GetWorkspaceSize success, workspace size 1024
[INFO]  Execute Operator success
[ERROR]  Synchronize stream failed. error code is 507035
[ERROR]  Run op failed
[INFO]  Reset Device success
[INFO]  Destory resource success
ERROR: acl executable run failed! please check your project!

plog

[ERROR] RUNTIME(12654,execute_op):2024-11-26-16:49:02.608.174 [device_error_proc.cc:1321]12654 ProcessStarsCoreErrorInfo:The extend info: errcode:(0, 0x8000, 0) errorStr: When the D-cache reads and writes data to the UB, the response value returned by the bus is a non-zero value. fixp_error0 info: 0x95abb85, fixp_error1 info: 0xc8 fsmId:0, tslot:0, thread:0, ctxid:0, blk:0, sublk:0, subErrType:4.

errorStr: When the D-cache reads and writes data to the UB, the response value returned by the bus is a non-zero value.

按照提示说明是内存越界了,但是我的代码里只是访问了workspace的第一值。 有人知道这是什么问题吗?

本帖最后由 匿名用户2024/11/26 18:50:27 编辑

我要发帖子