trunk/5d1d994be2d895f42bcfda682358b416ceb902c2: [torchfuzz] Stop the matmul family emitting a redundant cast (#197064)
- PyTorch: 1080 events in the last 90 days
- PyTorch: 1067th Release in the last 90 days
- Previous: earlier the same day · trunk/ad07a8bb39c0b040b078ef9495a464c844d49619
What happened
Summary: MMOperator , AddmmOperator , BmmOperator and MatmulOperator all end codegen by casting every operand to the output dtype: out = torch.matmul(a.to(torch.float32), b.to(torch.float32)) That cast can never convert anything. fuzz_inputs_specs assigns input dtypes from _get_compatible_dtype , which is defined once on the base class as return [output_dtype, output_dtype] and is never overridden, so every input is…
Summary assembled by rule from the sources below