Compare commits

...

1 Commits

Author SHA1 Message Date
57f9e88fbc test 2025-08-19 17:29:55 -07:00

View File

@ -1141,7 +1141,7 @@ class CppWrapperCpu(PythonWrapperCodegen):
"""
)
wrapper_body = "input_tensors = [arg if isinstance(arg, torch.Tensor) else torch.tensor(arg) for arg in args]"
wrapper_body = "input_tensors = [arg if isinstance(arg, torch.Tensor) else torch.tensor(arg, device='cpu') for arg in args]"
if V.graph.constants:
# Append constants to the input args for cpp wrapper.
# Python wrapper directly gets the value inside the wrapper call