代码如下,昇腾920B3,无语法问题编译通过,控制台日志都无输出
AscendC::PRINTF("[MY_DEBUG] ProcessRow start, row=%d\n", row);
AscendC::DumpTensor(aIndptrGm,1234,20);
int32_t rowStartIdx = aIndptrGm.GetValue(row);
int32_t rowEndIdx = aIndptrGm.GetValue(row + 1);
int32_t nnzInRow = rowEndIdx - rowStartIdx;
// 将标量值包装成 LocalTensor 后 dump
AscendC::LocalTensor<int32_t> debugInfo = outQueueC.AllocTensor<int32_t>();
debugInfo.SetValue(0, row);
debugInfo.SetValue(1, rowStartIdx);
debugInfo.SetValue(2, rowEndIdx);
debugInfo.SetValue(3, nnzInRow);
// Dump 调试信息
AscendC::DumpTensor(debugInfo, 9999, 4); // dump 前 4 个元素
outQueueC.FreeTensor(debugInfo);
代码如下,昇腾920B3,无语法问题编译通过,控制台日志都无输出
AscendC::PRINTF("[MY_DEBUG] ProcessRow start, row=%d\n", row);
AscendC::DumpTensor(aIndptrGm,1234,20);
int32_t rowStartIdx = aIndptrGm.GetValue(row);
int32_t rowEndIdx = aIndptrGm.GetValue(row + 1);
int32_t nnzInRow = rowEndIdx - rowStartIdx;
// 将标量值包装成 LocalTensor 后 dump
AscendC::LocalTensor<int32_t> debugInfo = outQueueC.AllocTensor<int32_t>();
debugInfo.SetValue(0, row);
debugInfo.SetValue(1, rowStartIdx);
debugInfo.SetValue(2, rowEndIdx);
debugInfo.SetValue(3, nnzInRow);
// Dump 调试信息
AscendC::DumpTensor(debugInfo, 9999, 4); // dump 前 4 个元素
outQueueC.FreeTensor(debugInfo);