Fix bug: not creating empty tensor with correct sizes and device. (#106734)
Summary:
logical_add and logical_add_ are reusing implementation of logical_add_out. But the `comparison_op` doesn't create an empty tensor with correct sizes and device type.
```
Tensor& logical_and_out(const Tensor& self, const Tensor& other, Tensor& result) { return comparison_op_out(result, self, other, logical_and_stub); }
Tensor logical_and(const Tensor& self, const Tensor& other) { return comparison_op(self, other, static_cast<OutFunc>(at::logical_and_out)); }
Tensor& logical_and_(Tensor& self, const Tensor& other) { return comparison_op_(self, other, static_cast<OutFunc>(at::logical_and_out)); }
```
Test Plan: CI tests.
Differential Revision: D48134169
Pull Request resolved: https://github.com/pytorch/pytorch/pull/106734
Approved by: https://github.com/jackm321