furiosa-opt v0.5.1 (3f99736deef4a1faedf0c2ac6813c82a2b1c8d31)에서 아래 코드가 BIN/EDF를 생성하지 못합니다.
use furiosa_opt_std::prelude::*;
axes![Slices = 16, Indices = 128, Width = 8];
type Chip = m![1];
type Cluster = m![1 # 2];
#[device(chip = 1)]
pub fn gather_i8_64k(
ctx: &mut Context,
table: &HbmTensor<i8, Chip, m![2, Width]>,
index: &HbmTensor<i32, Chip, m![Slices, 1 # 16, Indices]>,
) -> HbmTensor<i8, Chip, m![Slices, Indices, Width]> {
type Slice = m![Slices, 1 # 16];
let index: DmTensor<i32, Chip, Cluster, Slice, m![Indices]> = index.to_dm(&mut ctx.tdma);
let values: DmTensor<i8, Chip, Cluster, Slice, m![Indices, Width]> = table.dma_gather_unscaled(&index);
values.to_hbm(&mut ctx.tdma)
}
위 코드를 furiosa-opt-examples/src/spm_64k_repro.rs로 추가하고 src/lib.rs에서 export합니다.
pub mod spm_64k_repro;
다음 명령으로 재현됩니다.
cargo-furiosa-opt compile \
spm_64k_repro::gather_i8_64k \
-p furiosa-opt-examples \
--message-format human
visa: V1 failed for all operator schedule heuristics:
DfsPostOrder: BeamSearch failed after the beam shrank to zero at step 3/169; most frequent terminal error (1/1): Insufficient resources for T5 := DmaCommand(T4): {Spm: AllocRequest { wait_targets: [], size: 65536 }}
SethiUllman: BeamSearch failed after the beam shrank to zero at step 3/169; most frequent terminal error (1/1): Insufficient resources for T5 := DmaCommand(T4): {Spm: AllocRequest { wait_targets: [], size: 65536 }}
- non-empty BIN:
0/1 - non-empty EDF:
0/1 Indices = 64로만 변경하면 컴파일됩니다.
이 mapping의 64 KiB SPM 요청이 지원 대상이면 scheduler 수정을 부탁드립니다. 지원 대상이 아니면 allocation 상한과 공식 분할 방법을 알려주세요!