Fix bernoulli functionalization. (#87573)
For testing, see https://github.com/pytorch/pytorch/issues/87571
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
cc @jansel @lezcano @fdrocha @mlazos @soumith @voznesenskym @yanboliang
Pull Request resolved: https://github.com/pytorch/pytorch/pull/87573
Approved by: https://github.com/albanD