[torch.compile] fix tensor alias (#8982)

This commit is contained in:
youkaichao
2024-10-01 03:40:48 +00:00
committed by GitHub
parent aaccca2b4d
commit 7da2487591
3 changed files with 9 additions and 3 deletions
+2 -1
View File
@@ -103,7 +103,8 @@ class EmbeddingModelRunner(
# a placeholder (it has wide hardware support).
kv_caches = [
torch.tensor([], dtype=torch.float32, device=self.device)
] * num_layers
for _ in range(num_layers)
]
execute_model_kwargs = {
"input_ids":