Build Idefics-style vision position ids with torch.where (#49917)
The vision embeddings of Idefics2, Idefics3, SmolVLM and Phi-4 multimodal
fill position ids with a boolean-mask assignment. Its size depends on the
mask values, so torch.export records an unbacked size and emits
index/index_put ops, which runtimes without data-dependent kernels cannot
run. torch.where gives the same values element by element, because
position_ids starts as zeros, and keeps every shape static.