[Bugfix] Fix multi-modal support on CPU MRV2 (#50073)

Signed-off-by: jiang1.li <jiang1.li@intel.com>
This commit is contained in:
Li, Jiang
2026-07-28 06:09:48 +00:00
committed by GitHub
parent f472ab0a4c
commit 90245f4190
3 changed files with 18 additions and 1 deletions
+2
View File
@@ -457,6 +457,8 @@ class BaseMultiModalField(ABC):
device = "cpu"
if pin_memory and self.keep_on_cpu:
pin_memory = False
if device == "cpu" or device == torch.device("cpu"):
pin_memory = False
batch = [elem.data for elem in elems]
out = self._reduce_data(batch, pin_memory=pin_memory)