mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[torchfuzz] remove erroneous can_produce check (#164209)
can_produce is an abstract method that always return false Pull Request resolved: https://github.com/pytorch/pytorch/pull/164209 Approved by: https://github.com/pianpwk ghstack dependencies: #164034
This commit is contained in:
committed by
PyTorch MergeBot
parent
5b1c39f5a1
commit
abfcce58a4
@ -29,8 +29,6 @@ class PointwiseOperator(Operator):
|
||||
|
||||
def can_produce(self, output_spec: Spec) -> bool:
|
||||
"""Tensor pointwise operations can produce tensors but not scalars."""
|
||||
if not super().can_produce(output_spec):
|
||||
return False
|
||||
if isinstance(output_spec, TensorSpec) and output_spec.dtype == torch.bool:
|
||||
return False
|
||||
return isinstance(output_spec, TensorSpec)
|
||||
|
Reference in New Issue
Block a user