pytorch
f13be5fd - Check if generator has next normal sample cache methods in normal_distribution (#39816)

Commit
4 years ago
Check if generator has next normal sample cache methods in normal_distribution (#39816) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/39816 This change replaces [`#if !defined(__CUDACC__) && !defined(__HIPCC__)`](https://github.com/pytorch/pytorch/blob/856215509d89c935cd1768ce4b496d4fc0e919a6/aten/src/ATen/core/DistributionsHelper.h#L147) with SFINAE expression that checks if RNG typename has next_double_normal_sample, set_next_double_normal_sample, next_float_normal_sample, set_next_float_normal_sample methods It is required by (and manually tested with) https://github.com/pytorch/csprng/pull/28 Fixes #39618 Test Plan: Imported from OSS Differential Revision: D22002599 Pulled By: pbelevich fbshipit-source-id: e33d42a7e88c5729b077b9cdbf1437158dab48bc
Author
Parents
Loading