[NPU] optimization for dsv3.2 (#14572)

This commit is contained in:
ZhengdQin
2025-12-12 14:52:16 +08:00
committed by GitHub
parent edb172e927
commit c05d3afb5d
11 changed files with 140 additions and 67 deletions
+5
View File
@@ -245,6 +245,11 @@ class ReplicatedLinear(LinearBase):
else:
raise ValueError(f"{loaded_weight} are not all equal")
if param.dtype == torch.int8 or loaded_weight.dtype == torch.int8:
assert (
param.dtype == loaded_weight.dtype
), "init para dtype and loaded weight dtype should be the same"
assert param.size() == loaded_weight.size()
param.data.copy_(loaded_weight)