[torchfuzz] support more unbacked functions (#164687)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/164687
Approved by: https://github.com/pianpwk
ghstack dependencies: #164432, #164434, #164514, #164646, #164647, #164649
This commit is contained in:
bobrenjc93
2025-10-05 23:01:58 -07:00
committed by PyTorch MergeBot
parent 5fe7f29b9e
commit ac08556f67
2 changed files with 38 additions and 1 deletions

View File

@ -383,11 +383,41 @@ class UnbackedFuzzTemplate(FuzzTemplate):
"torch.ops.aten.nonzero",
"torch.ops.aten.masked_select",
"torch.ops.aten.unique",
# Include basic operations for building up data
# Basic arithmetic operations
"torch.add",
"torch.sub",
"torch.mul",
"torch.div",
# Tensor shape operations
"torch.Tensor.view",
"torch.reshape",
"torch.flatten",
"torch.squeeze",
"torch.unsqueeze",
# Matrix operations
"torch.mm",
"torch.addmm",
"torch.bmm",
"torch.matmul",
# Neural network operations
"torch.nn.functional.embedding",
"torch.nn.functional.linear",
# Activation functions
"torch.nn.functional.relu",
"torch.nn.functional.leaky_relu",
"torch.nn.functional.elu",
"torch.nn.functional.gelu",
"torch.nn.functional.silu",
"torch.sigmoid",
"torch.tanh",
"torch.nn.functional.softmax",
# Normalization layers
"torch.nn.functional.layer_norm",
"torch.nn.functional.rms_norm",
"torch.nn.functional.batch_norm",
"torch.nn.functional.group_norm",
# Regularization
"torch.nn.functional.dropout",
],
check=EagerVsFullGraphDynamicCompileCheck(),
)

View File

@ -59,6 +59,13 @@ IGNORE_PATTERNS: list[re.Pattern] = [
re.compile(
r"BooleanAtom not allowed in this context"
), # https://github.com/pytorch/pytorch/issues/160726
re.compile(
r"TypeError\(\"unsupported operand type\(s\) for \*: 'SymBool' and 'FakeTensor'\"\)"
), # https://github.com/pytorch/pytorch/issues/164684
re.compile(r"KeyError: u0"), # https://github.com/pytorch/pytorch/issues/164685
re.compile(
r"torch\._inductor\.exc\.InductorError: CppCompileError: C\+\+ compile error"
), # https://github.com/pytorch/pytorch/issues/164686
# Add more patterns here as needed, e.g.:
# re.compile(r"Some other error message"),
]