[Bugfix] Fix hunyuanimage3 dit quant storageshape mismatch error (#3694)
Signed-off-by: fan2956 <zhoufan53@huawei.com>
This commit is contained in:
1 parent
e2ed1c4574
commit
2c6b1bb0c0
2 files changed
+9
No files matched your search
@@ -252,3 +252,4 @@ fullset = "fullset"
|
|||||||
Vai = "Vai"
|
Vai = "Vai"
|
||||||
tockens = "tockens"
|
tockens = "tockens"
|
||||||
CANN = "CANN"
|
CANN = "CANN"
|
||||||
|
ND = "ND"
|
||||||
@@ -31,6 +31,14 @@ class NPUOmniPlatform(OmniPlatform, NPUPlatform):
|
|||||||
_omni_enum = OmniPlatformEnum.NPU
|
_omni_enum = OmniPlatformEnum.NPU
|
||||||
dist_backend: str = "hccl"
|
dist_backend: str = "hccl"
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def set_device(cls, device: torch.device) -> None:
|
||||||
|
super().set_device(device)
|
||||||
|
# Ascend quantized weights are converted from ND to FRACTAL_NZ
|
||||||
|
# after loading. Enable internal format so the NZ storage layout
|
||||||
|
# is preserved for fused NPU kernels.
|
||||||
|
torch.npu.config.allow_internal_format = True
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_omni_ar_worker_cls(cls) -> str:
|
def get_omni_ar_worker_cls(cls) -> str:
|
||||||
return "vllm_omni.platforms.npu.worker.npu_ar_worker.NPUARWorker"
|
return "vllm_omni.platforms.npu.worker.npu_ar_worker.NPUARWorker"
|
||||||
|
|||||||
Reference in new issue
Block a user