Files
pytorch/test/optim
Masaki Kozuki 2fcc2002fa Handle tail 0-size tensor appropriately in MultiTensorApply (#100811)
Fixes #100701

It seems like we don't call `multi_tensor_apply_kernel` at all if the input tensor lists are small and their last tensors are zero-size as per e.g. ca9f55f79d/aten/src/ATen/native/cuda/MultiTensorApply.cuh (L100-L102)
which was introduced in 05943712a4.

This PR special cases the last zero-size tensors so that we won't be negligent.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100811
Approved by: https://github.com/ngimel
2023-05-12 20:26:45 +00:00
..