OE包版本v3.0.31
芯片J6M
芯片J6M
我在采用下面这段代码打印output_tensors中的数值时,为什么输出都是0呢?其中通过对quant.bc进行推理是结果是正确的,但是.hbm在板端输出就没有值,可以用python调用hbm进行推理看结果吗?
for (int i = 0; i < output_count; i++) {
hbUCPMemFlush(&output_tensors[i].sysMem, HB_SYS_MEM_CACHE_INVALIDATE);
}
hbDNNTensor &tensor = output_tensors[3];
int32_t data = reinterpret_cast<int32_t >(tensor.sysMem.virAddr);
// 打印前 20 个数值
printf("===== output_tensors[0] (int32_t) 前20个数值 =====\n");
for (int i = 0; i < 20; ++i) {
printf("%d ", data[i]);
}
printf("\n");



