The issue is most likely raised, as nn.DataParallel uses the forward method to send each chunk of the data to the appropriate device.
I assume that you are calling func_that_uses_l1 directly, which won’t work.
You could try to pass a flag to forward to call the corresponding method.
Alternatively you would have to use scatter and gather the data manually in fun_that_uses_l1.