Skip to content

Commit 387b93a

Browse files
authored
Fix QKVCrossParallelLinear::sync_weight_attrs for PyTorch compile (#1184)
It fixes issue with compilation in Dynamo. Original version failed with: ```` torch._dynamo.exc.InternalTorchDynamoError: AttributeError: 'dict' object has no attribute 'node' ... from user code: .. File "./vllm/model_executor/layers/linear.py", line 1469, in sync_weight_attrs for k in (set(src_param.__dict__.keys()) - ````
1 parent 5efbb83 commit 387b93a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vllm/model_executor/layers/linear.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,8 +1512,8 @@ def sync_weight_attrs(
15121512
):
15131513
missing_attrs_dict = {
15141514
k: getattr(src_param, k)
1515-
for k in (set(src_param.__dict__.keys()) -
1516-
set(tgt_param.__dict__.keys()))
1515+
for k in (set(vars(src_param).keys()) -
1516+
set(vars(tgt_param).keys()))
15171517
}
15181518
# TODO(Isotr0py): handle bitsandbytes 8bit
15191519
use_bitsandbytes_4bit = getattr(src_param, "use_bitsandbytes_4bit",

0 commit comments

Comments
 (0)