pytorch
97510c6d - Convert operator.not_ to torch.logical_not (#94626)

Commit
1 year ago
Convert operator.not_ to torch.logical_not (#94626) If the input to operator.not_ is a tensor, I want to convert the operator to a torch.logical_not. This allows the following test case to pass. Beforehand it resulted in the error `NotImplementedError("local_scalar_dense/item NYI for torch.bool")` ``` def test_export_tensor_bool_not(self): def true_fn(x, y): return x + y def false_fn(x, y): return x - y def f(x, y): return cond(not torch.any(x), true_fn, false_fn, [x, y]) ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/94626 Approved by: https://github.com/voznesenskym
Author
Committer
Parents
Loading