Thanks. It seems that it does not work with sparse tensors (trying without batching):
import torch
i = torch.LongTensor([[0, 2], [2, 0], [1, 1]])
v = torch.FloatTensor([3,      4,      5    ])
A = torch.sparse.FloatTensor(i.t(), v, torch.Size([3,3])).cuda()
A_LU = torch.lu(A)
RuntimeError: Didn’t find kernel to dispatch to for operator ‘aten::_lu_with_info’. Tried to look up kernel for dispatch key ‘SparseCUDATensorId’. Registered dispatch keys are: [CUDATensorId, CPUTensorId, VariableTensorId]