Home
last modified time | relevance | path

Searched refs:PhiloxRandom (Results 1 – 25 of 80) sorted by relevance

1234

/external/tensorflow/tensorflow/core/kernels/
Drandom_op_gpu.cu.cc42 GPUDevice, random::UniformDistribution<random::PhiloxRandom, Eigen::half> >;
44 GPUDevice, random::UniformDistribution<random::PhiloxRandom, float> >;
46 GPUDevice, random::UniformDistribution<random::PhiloxRandom, double> >;
48 GPUDevice, random::UniformDistribution<random::PhiloxRandom, int32> >;
50 GPUDevice, random::UniformDistribution<random::PhiloxRandom, int64> >;
53 random::UniformFullIntDistribution<random::PhiloxRandom, int32> >;
56 random::UniformFullIntDistribution<random::PhiloxRandom, int64> >;
59 random::UniformFullIntDistribution<random::PhiloxRandom, uint32> >;
62 random::UniformFullIntDistribution<random::PhiloxRandom, uint64> >;
64 GPUDevice, random::NormalDistribution<random::PhiloxRandom, Eigen::half> >;
[all …]
Dstateful_random_ops_gpu.cu.cc36 using random::PhiloxRandom;
45 __shared__ char philox_raw[sizeof(PhiloxRandom)]; in FillKernel()
46 auto philox = reinterpret_cast<PhiloxRandom*>(philox_raw); in FillKernel()
122 GPUDevice, random::NormalDistribution<random::PhiloxRandom, Eigen::half> >;
124 GPUDevice, random::NormalDistribution<random::PhiloxRandom, float> >;
126 GPUDevice, random::NormalDistribution<random::PhiloxRandom, double> >;
129 random::SingleSampleAdapter<random::PhiloxRandom>,
133 random::SingleSampleAdapter<random::PhiloxRandom>,
137 random::SingleSampleAdapter<random::PhiloxRandom>,
140 GPUDevice, random::UniformDistribution<random::PhiloxRandom, Eigen::half> >;
[all …]
Drandom_ops_util.h23 using random::PhiloxRandom;
40 PHILOX_DEVICE_INLINE PhiloxRandom::ResultType GetCounterFromMem( in GetCounterFromMem()
42 PhiloxRandom::ResultType counter; in GetCounterFromMem()
49 PhiloxRandom::ResultType const& counter, uint64* ptr) { in WriteCounterToMem()
54 PHILOX_DEVICE_INLINE PhiloxRandom::Key GetKeyFromMem(uint64 const* ptr) { in GetKeyFromMem()
55 PhiloxRandom::Key key; in GetKeyFromMem()
60 PHILOX_DEVICE_INLINE void WriteKeyToMem(PhiloxRandom::Key const& key, in WriteKeyToMem()
65 PHILOX_DEVICE_INLINE PhiloxRandom GetPhiloxRandomFromCounterKeyMem( in GetPhiloxRandomFromCounterKeyMem()
67 return PhiloxRandom(GetCounterFromMem(counter_ptr), GetKeyFromMem(key_ptr)); in GetPhiloxRandomFromCounterKeyMem()
Drandom_op_cpu.h54 using random::PhiloxRandom;
64 const uint64* counter, random::PhiloxRandom gen, T* data, in operator()
84 static void Run(random::PhiloxRandom gen, T* data, int64 size,
115 static void Run(random::PhiloxRandom base_gen, T* data, int64 size,
121 PhiloxRandom::kResultElementCount;
133 PhiloxRandom gen = base_gen;
135 SingleSampleAdapter<PhiloxRandom> single_samples(&gen);
144 PhiloxRandom gen = base_gen;
146 SingleSampleAdapter<PhiloxRandom> single_samples(&gen);
160 const uint64* counter, random::PhiloxRandom gen,
[all …]
Drandom_op.cc120 typedef random::UniformDistribution<random::PhiloxRandom, IntType> in Compute()
176 using random::PhiloxRandom; in Compute()
178 typedef random::NormalDistribution<PhiloxRandom, double> Normal; in Compute()
179 typedef random::UniformDistribution<PhiloxRandom, double> Uniform; in Compute()
198 PhiloxRandom rng = generator_.ReserveRandomOutputs( in Compute()
238 PhiloxRandom gen = rng; in Compute()
266 PhiloxRandom gen = rng; in Compute()
315 3 * PhiloxRandom::kElementCost; in Compute()
331 CPUDevice, random::UniformDistribution<random::PhiloxRandom, TYPE>>; \
333 CPUDevice, random::NormalDistribution<random::PhiloxRandom, TYPE>>; \
[all …]
Dstateful_random_ops_cpu_gpu.h25 PHILOX_DEVICE_INLINE PhiloxRandom
31 PHILOX_DEVICE_INLINE void WritePhiloxRandomToMem(PhiloxRandom const& philox, in WritePhiloxRandomToMem()
38 PHILOX_DEVICE_INLINE PhiloxRandom SkipPhiloxRandom(PhiloxRandom const& philox, in SkipPhiloxRandom()
48 PHILOX_DEVICE_INLINE void UpdateMemWithPhiloxRandom(PhiloxRandom const& philox, in UpdateMemWithPhiloxRandom()
56 PhiloxRandom::ResultType const& counter, uint64 output_size, in UpdateCounterMemWithPhiloxRandom()
58 auto philox = PhiloxRandom(counter, PhiloxRandom::Key() /*dummy*/); in UpdateCounterMemWithPhiloxRandom()
Dstateless_random_ops.cc32 Status GenerateKey(Tensor seed, random::PhiloxRandom::Key* out_key, in GenerateKey()
33 random::PhiloxRandom::ResultType* out_counter) { in GenerateKey()
58 const auto mix = random::PhiloxRandom(*out_counter, *out_key)(); in GenerateKey()
89 random::PhiloxRandom::Key key; in Compute()
90 random::PhiloxRandom::ResultType counter; in Compute()
94 Fill(context, random::PhiloxRandom(counter, key), output); in Compute()
98 virtual void Fill(OpKernelContext* context, random::PhiloxRandom random,
107 void Fill(OpKernelContext* context, random::PhiloxRandom random, in Fill()
123 void Fill(OpKernelContext* context, random::PhiloxRandom random, in Fill()
143 typedef random::UniformDistribution<random::PhiloxRandom, IntType> in Fill()
[all …]
Dstateless_random_gamma_op.cc61 const random::PhiloxRandom& random, T* samples_flat) { in Fill()
62 typedef random::NormalDistribution<random::PhiloxRandom, double> Normal; in Fill()
63 typedef random::UniformDistribution<random::PhiloxRandom, double> Uniform; in Fill()
104 random::PhiloxRandom gen = random; in Fill()
131 random::PhiloxRandom gen = random; in Fill()
182 3 * random::PhiloxRandom::kElementCost; in Fill()
215 random::PhiloxRandom::Key key; in Compute()
216 random::PhiloxRandom::ResultType counter; in Compute()
220 Fill(context, random::PhiloxRandom(counter, key), output); in Compute()
224 void Fill(OpKernelContext* ctx, random::PhiloxRandom random, Tensor* output) { in Fill()
Drandom_op_gpu.h38 random::PhiloxRandom gen, T* data, int64 size,
46 random::PhiloxRandom base_gen, T* data,
142 const uint64* key, const uint64* counter, random::PhiloxRandom gen, T* data,
177 const uint64* key, const uint64* counter, random::PhiloxRandom base_gen,
179 using random::PhiloxRandom;
186 PhiloxRandom::kResultElementCount;
199 PhiloxRandom gen = base_gen;
201 SingleSampleAdapter<PhiloxRandom> single_samples(&gen);
222 random::PhiloxRandom base_gen,
234 const uint64* counter, random::PhiloxRandom gen,
Dstateless_random_gamma_op_gpu.cu.cc47 random::PhiloxRandom random, T* samples_flat, in FillKernel()
54 typedef random::NormalDistribution<random::PhiloxRandom, double> Normal; in FillKernel()
55 typedef random::UniformDistribution<random::PhiloxRandom, double> Uniform; in FillKernel()
75 random::PhiloxRandom gen = random; in FillKernel()
100 random::PhiloxRandom gen = random; in FillKernel()
154 const random::PhiloxRandom& random, T* samples_flat) { in Fill()
Dstateless_random_ops_v2.cc119 random::PhiloxRandom() /*dummy*/, flat.data(), flat.size(), in Fill()
153 typedef random::UniformDistribution<random::PhiloxRandom, IntType> in Fill()
164 random::PhiloxRandom() /*dummy*/, flat.data(), flat.size(), dist); in Fill()
180 typedef random::UniformFullIntDistribution<random::PhiloxRandom, IntType> in Fill()
191 random::PhiloxRandom() /*dummy*/, flat.data(), flat.size(), dist); in Fill()
219 random::PhiloxRandom::Key key; in Compute()
220 random::PhiloxRandom::ResultType counter; in Compute()
246 random::PhiloxRandom::Key key; in Compute()
247 random::PhiloxRandom::ResultType counter; in Compute()
273 random::PhiloxRandom, TYPE> >); \
[all …]
Dstateful_random_ops.h32 using random::PhiloxRandom;
35 (PhiloxRandom::ResultType::kElementCount +
36 PhiloxRandom::Key::kElementCount) /
Drandom_binomial_op.cc62 typedef random::UniformDistribution<random::PhiloxRandom, double> Uniform;
69 random::PhiloxRandom* gen) { in binomial_inversion()
109 inline double btrs(double count, double prob, random::PhiloxRandom* gen) { in btrs()
179 const random::PhiloxRandom& gen, in operator ()()
237 random::PhiloxRandom gen_copy = gen; in operator ()()
246 random::PhiloxRandom gen_copy = gen; in operator ()()
263 random::PhiloxRandom gen_copy = gen; in operator ()()
272 random::PhiloxRandom gen_copy = gen; in operator ()()
316 6 * random::PhiloxRandom::kElementCost; in operator ()()
414 static_assert(std::is_same<PhiloxRandom::ResultElementType, uint32>::value, in Compute()
[all …]
Dparameterized_truncated_normal_op.cc47 using random::PhiloxRandom;
59 const random::PhiloxRandom& gen, in operator ()()
78 random::PhiloxRandom gen_copy = gen; in operator ()()
84 using Uniform = random::UniformDistribution<random::PhiloxRandom, T>; in operator ()()
86 using Normal = random::NormalDistribution<random::PhiloxRandom, T>; in operator ()()
293 random::PhiloxRandom::kElementCost + in operator ()()
294 random::UniformDistribution<random::PhiloxRandom, T>::kElementCost; in operator ()()
322 const random::PhiloxRandom& gen, in operator ()()
341 random::PhiloxRandom gen_copy = gen; in operator ()()
342 using Uniform = random::UniformDistribution<random::PhiloxRandom, T>; in operator ()()
[all …]
Drandom_poisson_op.cc75 const random::PhiloxRandom& rng, U* samples_flat) { in operator ()()
97 typedef random::UniformDistribution<random::PhiloxRandom, CT> Uniform; in operator ()()
131 random::PhiloxRandom gen = rng; in operator ()()
203 random::PhiloxRandom gen = rng; in operator ()()
270 6 * random::PhiloxRandom::kElementCost; in operator ()()
309 random::PhiloxRandom rng = generator_.ReserveRandomOutputs( in Compute()
Dstateless_random_ops.h29 Status GenerateKey(Tensor seed_t, random::PhiloxRandom::Key* out_key,
30 random::PhiloxRandom::ResultType* out_counter);
Drandom_op.h44 const uint64* counter, random::PhiloxRandom gen,
55 const uint64* counter, random::PhiloxRandom gen,
/external/tensorflow/tensorflow/core/util/
Dguarded_philox_random.h52 void Init(random::PhiloxRandom::ResultType counter,
53 random::PhiloxRandom::Key key);
58 random::PhiloxRandom ReserveSamples128(int64 samples);
61 random::PhiloxRandom ReserveSamples32(int64 samples) { in ReserveSamples32()
66 random::PhiloxRandom ReserveRandomOutputs(int64 output_count, in ReserveRandomOutputs()
74 random::PhiloxRandom generator_ TF_GUARDED_BY(mu_);
Dguarded_philox_random.cc42 generator_ = random::PhiloxRandom(seed, seed2); in Init()
46 void GuardedPhiloxRandom::Init(random::PhiloxRandom::ResultType counter, in Init()
47 random::PhiloxRandom::Key key) { in Init()
50 generator_ = random::PhiloxRandom(counter, key); in Init()
54 random::PhiloxRandom GuardedPhiloxRandom::ReserveSamples128(int64 samples) { in ReserveSamples128()
/external/tensorflow/tensorflow/core/lib/random/
Dphilox_random_test.cc38 static constexpr int kResultElementCount = PhiloxRandom::kResultElementCount;
39 typedef PhiloxRandom::ResultType ResultType;
40 typedef PhiloxRandom::ResultElementType ResultElementType;
43 ResultType operator()(PhiloxRandom* gen) { return (*gen)(); } in operator ()()
55 PhiloxRandom gen(test_seed); in TEST()
62 PhiloxRandom gen(test_seed); in TEST()
Dsimple_philox_test.cc30 PhiloxRandom philox(7, 7); in TEST()
59 PhiloxRandom philox1(1, 1), philox2(17, 17); in TEST()
66 PhiloxRandom philox1(1, 1), philox2(2, 1); in TEST()
76 PhiloxRandom philox1(0, 1), philox2(1, 1); in TEST()
96 PhiloxRandom philox(17, 17); in TEST()
115 PhiloxRandom philox(17, 17); in TEST()
Drandom_distributions_test.cc47 void FillRandomsWithSingles(PhiloxRandom gen, in FillRandomsWithSingles()
55 SingleSampleAdapter<PhiloxRandom> single_samples(&gen); in FillRandomsWithSingles()
156 PhiloxRandom gen(seed); in UniformMomentsTest()
157 FillRandoms<UniformDistribution<PhiloxRandom, T> >(gen, &v1[0], v1.size()); in UniformMomentsTest()
187 PhiloxRandom gen(seed); in NormalMomentsTest()
188 FillRandoms<NormalDistribution<PhiloxRandom, T> >(gen, &v1[0], v1.size()); in NormalMomentsTest()
247 PhiloxRandom gen(seed); in RandomParametersMomentsTest()
249 TruncatedNormalDistribution<SingleSampleAdapter<PhiloxRandom>, T> >( in RandomParametersMomentsTest()
364 SingleSampleAdapterSkipTest<PhiloxRandom>(); in TEST()
Dphilox_random.h103 class PhiloxRandom {
116 PhiloxRandom() {} in PhiloxRandom() function
119 explicit PhiloxRandom(uint64 seed) { in PhiloxRandom() function
125 explicit PhiloxRandom(uint64 seed_lo, uint64 seed_hi) { in PhiloxRandom() function
133 PhiloxRandom(ResultType counter, Key key) : counter_(counter), key_(key) {} in PhiloxRandom() function
Dsimple_philox.h33 explicit SimplePhilox(PhiloxRandom* gen) : single_(gen) {} in SimplePhilox()
70 SingleSampleAdapter<PhiloxRandom> single_;
/external/tensorflow/tensorflow/core/kernels/data/experimental/
Drandom_dataset_op.cc124 parent_generator_ = random::PhiloxRandom(seeds_.first, seeds_.second); in RestoreInternal()
126 random::SingleSampleAdapter<random::PhiloxRandom>(&parent_generator_); in RestoreInternal()
132 random::SingleSampleAdapter<random::PhiloxRandom>::ResultType Random() in Random()
140 random::PhiloxRandom parent_generator_ TF_GUARDED_BY(mu_);
141 random::SingleSampleAdapter<random::PhiloxRandom> generator_

1234