Merged
docs: 修复注释与代码不一致(asinh dtype 范围与 cdist UB 注释) #6492
TangPCAdd on 19 days ago
docs: 修复注释与代码不一致(asinh dtype 范围与 cdist UB 注释) #6492
Merged
Total: 2 files changed+5-4
| @@ -19,8 +19,8 @@ | |||
| 19 | * - PrecisionReduceFlag(false):19 步内部已升 FP32 精度,无需框架降精度 | 19 | * - PrecisionReduceFlag(false):19 步内部已升 FP32 精度,无需框架降精度 |
| 20 | * - ascend950、ascend350(DAV_3510 / arch35,复用 arch35 tiling) | 20 | * - ascend950、ascend350(DAV_3510 / arch35,复用 arch35 tiling) |
| 21 | * | 21 | * |
| 22 | - * 迭代一范围:仅 FP32 完整实现;FP16/BF16 在迭代二落地。 | 22 | + * dtype 范围:FP32、FP16、BF16 均已实现。 |
| 23 | - * 但 DataType 列表声明 3 个 dtype 保证 TilingKey 接口稳定。 | 23 | + * DataType 列表声明 3 个 dtype 保证 TilingKey 接口稳定。 |
| 24 | */ | 24 | */ |
| 25 | #include "register/op_def_registry.h" | 25 | #include "register/op_def_registry.h" |
| 26 | 26 | ||
| @@ -485,8 +485,9 @@ void CdistTiling::DoTiling() | |||
| 485 | if (M_ >= kHlMMin && M_ <= M_SIZE && hlVectorWins) { | 485 | if (M_ >= kHlMMin && M_ <= M_SIZE && hlVectorWins) { |
| 486 | is_small_m_ = 0; // launch on the Normal-shaped tiling | 486 | is_small_m_ = 0; // launch on the Normal-shaped tiling |
| 487 | use_reduce_hl_ = 1; // but dispatch to the high-level reduce kernel (KERNEL_MODE=3) | 487 | use_reduce_hl_ = 1; // but dispatch to the high-level reduce kernel (KERNEL_MODE=3) |
| 488 | - // Reserve UB for the two fixed HL fp32 compute planes (x1exp + diff, 4096 elems each = 32KB) plus | 488 | + // Reserve UB for the two fixed HL fp32 compute planes (x1exp + diff, 8192 elems each = 32KB per |
| 489 | - // the fp32 M-split accumulator margin, so the extra planes never overflow UB on large P·R tiles. | 489 | + // plane, 64KB total) plus the fp32 M-split accumulator margin, so the extra planes never overflow |
| 490 | + // UB on large P·R tiles. | ||
| 490 | int64_t savedUb = ubSize_; | 491 | int64_t savedUb = ubSize_; |
| 491 | ubSize_ = ubSize_ - HL_UB_RESERVE; | 492 | ubSize_ = ubSize_ - HL_UB_RESERVE; |
| 492 | if (ubSize_ < BLOCK_BYTES) | 493 | if (ubSize_ < BLOCK_BYTES) |