From ad66de4003564498bfaf71c1b5d6a349c083fb69 Mon Sep 17 00:00:00 2001 From: Zhu Guodong Date: Thu, 11 May 2023 10:39:04 +0800 Subject: [PATCH] fix nnrt compile error Change-Id: Ife5f066732f3843d95c433092d8fe72f4437f322 Signed-off-by: Zhu Guodong --- ai/mindspore/src/ohos_c_api_test_mslite.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ai/mindspore/src/ohos_c_api_test_mslite.cpp b/ai/mindspore/src/ohos_c_api_test_mslite.cpp index c8b639afc..79487694e 100644 --- a/ai/mindspore/src/ohos_c_api_test_mslite.cpp +++ b/ai/mindspore/src/ohos_c_api_test_mslite.cpp @@ -71,9 +71,10 @@ void AddContextDeviceNNRT(OH_AI_ContextHandle context) { return; } - printf("found %u nnrt devices.\n", num); + std::cout << "found " << num << " nnrt devices" << std::endl; for (size_t i = 0; i < num; i++) { - printf("nnrt device %u: {device_id: %u, type:%d, name:%s}\n", i, desc[i].device_id, desc[i].device_type, desc[i].device_name); + std::cout << "nnrt device " << i << ": {device_id: " << desc[i].device_id + << ", type:" << desc[i].device_type << ", name:" << desc[i].device_name << std::endl; } OH_AI_DeviceInfoSetDeviceId(nnrt_device_info, desc[0].device_id); -- GitLab