Merged
for kirin 516 static check #7446
zengjuanAdd on 12 days ago
for kirin 516 static check #7446
Merged
Merged fromzengjuan/asc-devkit_516masterintocann/asc-devkitmaster
Total: 2 files changed+4-2
| @@ -297,7 +297,9 @@ __aicore__ inline bool TPipe::InitBuffer(T& que, uint8_t num, uint32_t len) | |||
| 297 | ASCENDC_DEBUG_ASSERT( | 297 | ASCENDC_DEBUG_ASSERT( |
| 298 | (pool != Hardware::MAX), KERNEL_LOG_INTERNAL(KERNEL_ERROR, "buffer pos can not be Hardware::MAX")); | 298 | (pool != Hardware::MAX), KERNEL_LOG_INTERNAL(KERNEL_ERROR, "buffer pos can not be Hardware::MAX")); |
| 299 | auto curPoolAddr = this->g_tpipeImpl.bufPool_[static_cast<uint8_t>(pool)].maxAddr; | 299 | auto curPoolAddr = this->g_tpipeImpl.bufPool_[static_cast<uint8_t>(pool)].maxAddr; |
| 300 | -#if defined(__NPU_ARCH__) && ((__NPU_ARCH__ == 3003) || (__NPU_ARCH__ == 3103) || (__NPU_ARCH__ == 3113)) | 300 | +#if defined(__NPU_ARCH__) && \ |
| 301 | + (__NPU_ARCH__ == 3003 || __NPU_ARCH__ == 3103 || __NPU_ARCH__ == 3113 || __NPU_ARCH__ == 5101 || \ | ||
| 302 | + __NPU_ARCH__ == 5161 || __NPU_ARCH__ == 5165 || __NPU_ARCH__ == 5163) | ||
| 301 | if constexpr (T::dstPosition == TPosition::C2PIPE2GM) { | 303 | if constexpr (T::dstPosition == TPosition::C2PIPE2GM) { |
| 302 | curPoolAddr = 0; | 304 | curPoolAddr = 0; |
| 303 | } | 305 | } |
| @@ -111,7 +111,7 @@ uint32_t PlatformAscendC::GetVecRegLen(void) const | |||
| 111 | if (size == 0) { | 111 | if (size == 0) { |
| 112 | PF_LOGE("The bit width equals zero!"); | 112 | PF_LOGE("The bit width equals zero!"); |
| 113 | } | 113 | } |
| 114 | - return ret ? static_cast<uint32_t>(size) : 2 * static_cast<uint32_t>(size); | 114 | + return ret ? static_cast<uint32_t>(size) : sizeof(uint16_t) * static_cast<uint32_t>(size); |
| 115 | } else { | 115 | } else { |
| 116 | PF_LOGE("The sizeStr is invalid."); | 116 | PF_LOGE("The sizeStr is invalid."); |
| 117 | return 0u; | 117 | return 0u; |