[inductor] Add fallback for collectives size estimation for unbacked (#127562)

Differential Revision: [D57982928](https://our.internmc.facebook.com/intern/diff/D57982928)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/127562
Approved by: https://github.com/yifuwang
This commit is contained in:
IvanKobzarev
2024-05-30 13:01:48 -07:00
committed by PyTorch MergeBot
parent f4d7cdc5e6
commit df0c69f32d

View File

@ -59,7 +59,7 @@ def get_collective_input_size_bytes(node: ir.IRNode) -> int:
# For ease of testing
numel = int(numel)
else:
numel = V.graph.sizevars.size_hint(numel)
numel = V.graph.sizevars.size_hint(numel, fallback=0)
sz_bytes += numel * get_dtype_size(inp.layout.dtype)
return sz_bytes