[Lazy][JIT] Do not crash when target device is unsupported by fuser (#73820)
Summary:
The `canFuseOnDevice` function now crashes when the device is not covered (i.e., CPU, GPU, XPU). However, now we have some devices, such as XLA and Lazy, that could perform fusion by themselves. This checker then prevents these devices from working on the models partially implemented in `jit.script`.
This PR proposes to remove this checker and simply return false for all uncovered cases. Another alternative is adding the following logic if it is unsafe to simply remove the checker:
```
else if (device-> type() == DeviceType::XLA || device-> type() == DeviceType::Lazy) {
return false;
} else {
TORCH_CHECK_NOT_IMPLEMENTED(false, "Unknown device for tensorexpr fuser")
}
```
cc wconstab
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73820
Reviewed By: navahgar
Differential Revision: D34731314
Pulled By: wconstab
fbshipit-source-id: 1c0a90dcd6c67803a27fa2f305d78b2a539f3604
(cherry picked from commit 94c61d6c0a9c2ef6e0d046f7f06a7158b43d4d61)