打开微信,使用扫一扫进入页面后,点击右上角菜单,
点击“发送给朋友”或“分享到朋友圈”完成分享
【寒武纪硬件产品型号】:
MLU270
【使用操作系统】:
ubuntu
【使用驱动版本】:
v4.20.6
【SDK版本】:
1.7.0
【CNToolkit版本】:
1.7.3
代码:
//初始化设备0
CNRT_CHECK(cnrtInit(0));
//可用mlu设备数量
unsigned int nDevices = 0;
CNRT_CHECK(cnrtGetDeviceCount(&nDevices));
cout << nDevices << " MLU devices available" << endl;
//使用设备0
cnrtDev_t dev;
cnrtGetDeviceHandle(&dev, devNum);
cnrtSetCurrentDevice(dev);
//输出设备信息
cnrtDeviceInfo_t info;
cout << "using MLU device " << devNum << endl;
cout << "device_name:" << info.device_name << endl;
cout << "core_version:" << info.core_version << endl;
cout << "core_num:" << info.core_num << endl;
输出:
热门帖子
精华帖子