[Model Runner V2][Minor] Simplify PP logic (#38031)

Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
Nick Hill
2026-03-24 13:57:17 -07:00
committed by GitHub
parent 0c1809c806
commit 4e824d1c83
3 changed files with 23 additions and 28 deletions
+9
View File
@@ -62,3 +62,12 @@ class IntermediateTensors:
def __repr__(self) -> str:
return f"IntermediateTensors(tensors={self.tensors})"
@staticmethod
def empty_like(
intermediate_tensors: "IntermediateTensors",
) -> "IntermediateTensors":
tensors = {
k: torch.empty_like(v) for k, v in intermediate_tensors.tensors.items()
}
return IntermediateTensors(tensors)