hfppl icon indicating copy to clipboard operation
hfppl copied to clipboard

Bug: Tensor device error when using multiple gpu

Open zinccat opened this issue 1 year ago • 0 comments

When running examples/hard_constraints.py using two gpus, has following error:

hfppl/hfppl/llms.py", line 244, in past_padded
    return torch.cat(
           ^^^^^^^^^^
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! (when checking argument for argument tensors in method wrapper_CUDA_cat)

zinccat avatar Jan 04 '25 22:01 zinccat