-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Description
Updated 6/7/2021
PyTorch once had "tensor_op_tests", but they were removed in #55558. These tests would run a method once on the CPU and once on a CUDA or XLA device and compare the results. What these tests did and how they should be used was confusing, however, and they were often added when it was unnecessary to do so or removed as OpInfos were created for them, even though the OpInfo tests do not yet cover the same cases.
After some discussion (see below), instead of using the CPU as the source of truth, we would like to generalize the OpInfo architecture to support references. UnaryUfuncInfos already support references, but the OpInfo base class does not. This reference can then be compared against PyTorch's implementation of the operation on its sample inputs.
cc @mruberry @VitalyFedyunin @walterddr @kshitij12345 @krshrimali -- maybe an interesting task for @krshrimali's onboarding?