已合并
【Bugfix】a5 adapt to nbuffer33 #1312
myx_32创建于 3月30日
【Bugfix】a5 adapt to nbuffer33 #1312
已合并
myx_32创建于 3月30日
1 个文件变更+5-1
@@ -529,7 +529,11 @@ MKNParasCombo MatmulTilingAlgorithm::GetParasCombo(const int32_t& index, const M
529{529{
530 (void)(param);530 (void)(param);
531 std::map<int32_t, MKNParasCombo> parasComboMap;531 std::map<int32_t, MKNParasCombo> parasComboMap;
532- const int32_t mnMax = tilingIns_->bufferPool_.l0CSize / (C0_SIZE * C0_SIZE) / FP32_BYTES;532+ // Only for david nbuffer33, others not affected.
533+ // Use actual l0c size can improve performance in david.
534+ constexpr int32_t l0cSizeForNbuffer33 = 128 * 1024;
535+ const int32_t l0CSize = (tilingIns_->scheduleType != ScheduleType::N_BUFFER_33) ? tilingIns_->bufferPool_.l0CSize : l0cSizeForNbuffer33;
536+ const int32_t mnMax = l0CSize / (C0_SIZE * C0_SIZE) / FP32_BYTES;
533 int32_t maxN = 64;537 int32_t maxN = 64;
534 // in V220/V300, consider bias table buffer limit538 // in V220/V300, consider bias table buffer limit
535 if (tilingIns_->socVersion == platform_ascendc::SocVersion::ASCEND910B ||539 if (tilingIns_->socVersion == platform_ascendc::SocVersion::ASCEND910B ||