|
|
|
@@ -66,6 +66,7 @@ bool HcomUtil::GetHcomDataType(const AnfNodePtr &anf_node, vector<hcclDataType_t |
|
|
|
} |
|
|
|
|
|
|
|
bool HcomUtil::GetHcclOpSize(const hcclDataType_t &data_type, const vector<size_t> &shape, size_t *size) { |
|
|
|
MS_EXCEPTION_IF_NULL(size); |
|
|
|
int tmp_size = 1; |
|
|
|
uint32_t type_size = 4; |
|
|
|
for (size_t i = 0; i < shape.size(); i++) { |
|
|
|
@@ -84,6 +85,7 @@ bool HcomUtil::GetHcclOpSize(const hcclDataType_t &data_type, const vector<size_ |
|
|
|
} |
|
|
|
|
|
|
|
bool HcomUtil::GetHcomTypeSize(const hcclDataType_t &data_type, uint32_t *size) { |
|
|
|
MS_EXCEPTION_IF_NULL(size); |
|
|
|
auto iter = CONST_OP_HCOM_DATA_TYPE_SIZE_MAP.find(data_type); |
|
|
|
if (iter == CONST_OP_HCOM_DATA_TYPE_SIZE_MAP.end()) { |
|
|
|
MS_LOG(ERROR) << "HcomUtil::HcomDataTypeSize, No DataTypeSize!"; |
|
|
|
|