Set proper output differentiability for unique function (#47930)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/47851
Since the definitions of these functions in `native_functions.yaml` has special dispatch, we were already generating the proper `NotImplemented` behavior for these functions but we were wrongfully setting that gradient of all of the outputs.
Added entries in `derivatives.yaml` to allow us to specify which outpus are differentiable or not.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/47930
Reviewed By: smessmer
Differential Revision: D24960667
Pulled By: albanD
fbshipit-source-id: 19e5bb3029cf0d020b31e2fa264b3a03dd86ec10