已合并
fix-static-warning #647
Cruiter创建于 3月2日
fix-static-warning #647
已合并
共 1 个文件变更+1-1
| @@ -329,7 +329,7 @@ void GetLayerNormNDTilingInfo(const ge::Shape& srcShape, const uint32_t stackBuf | |||
| 329 | uint32_t rLengthWithPadding = (rLength + typeAignSize - 1) / typeAignSize * typeAignSize; | 329 | uint32_t rLengthWithPadding = (rLength + typeAignSize - 1) / typeAignSize * typeAignSize; |
| 330 | uint32_t rHeadLength = platform->GetVecRegLen() / sizeof(float); | 330 | uint32_t rHeadLength = platform->GetVecRegLen() / sizeof(float); |
| 331 | ASCENDC_HOST_ASSERT(rHeadLength != 0, return, "rHeadLength can not be 0"); | 331 | ASCENDC_HOST_ASSERT(rHeadLength != 0, return, "rHeadLength can not be 0"); |
| 332 | - uint32_t k = log2(rHeadLength); | 332 | + uint32_t k = static_cast<uint32_t>(log2(rHeadLength)); |
| 333 | for (uint32_t i = 0; i < rLengthWithPadding; i++) { | 333 | for (uint32_t i = 0; i < rLengthWithPadding; i++) { |
| 334 | if (rHeadLength * LAYERNORM_FOLD_NUM > rLength) { | 334 | if (rHeadLength * LAYERNORM_FOLD_NUM > rLength) { |
| 335 | k += i; | 335 | k += i; |