* Copyright (c) 2025 Huawei Technologies Co., Ltd.
* This program is free software, you can redistribute it and/or modify it under the terms and conditions of
* CANN Open Software License Agreement Version 2.0 (the "License").
* Please refer to the License for details. You may not use this file except in compliance with the License.
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
* See LICENSE in the root of the software repository for the full text of the License.
*/
#ifndef HOST_INNER_INC_DATA_COMMON_H_
#define HOST_INNER_INC_DATA_COMMON_H_
#include <string>
namespace tdt {
#ifndef TDT_DATA_TYPE
#define TDT_DATA_TYPE
* @ingroup Tdt data.
*
* Tdt data type.
*/
enum TdtDataType {
TDT_IMAGE_LABEL = 0,
TDT_TFRECORD,
TDT_DATA_LABEL,
TDT_END_OF_SEQUENCE,
TDT_TENSOR,
TDT_ABNORMAL,
TDT_DATATYPE_MAX
};
#endif
* @ingroup Tdt data.
*
* Tdt push data between host and device.
*/
struct TdtDataItem {
TdtDataType dataType_;
uint64_t label_;
uint64_t dataLen_;
uint64_t realDataLen_;
std::string tensorShape_;
std::string tensorType_;
uint32_t cnt_;
uint32_t currentCnt_;
uint64_t index_;
std::string tensorName_;
uint64_t md5ValueHead_;
uint64_t md5ValueTail_;
std::shared_ptr<void> dataPtr_;
std::string headMD5_;
std::string tailMD5_;
};
* @ingroup Tdt data.
*
* Tdt push data for queuedataset ort mind-data.
*/
struct DataItem {
TdtDataType dataType_;
std::string tensorName_;
std::string tensorShape_;
std::string tensorType_;
uint64_t dataLen_;
std::shared_ptr<void> dataPtr_;
};
* @ingroup Tsdclient.
*
* tsdclient func type;
*/
enum TsdCmdType {
TSDCLOSE = 0,
TSDOPEN = 1
};
* @ingroup Tsdclient.
*
* tsdclient func input value object.
*/
enum InputItem {
OPEN_DEVICEID = 0,
OPEN_RANKSIZE,
CLOSE_DEVICEID
};
}
#endif