MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / MakeCPUGenerator

Function MakeCPUGenerator

oneflow/core/framework/random_generator.cpp:171–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171Maybe<Generator> MakeCPUGenerator() {
172 static auto device_mgr =
173 Singleton<ep::DeviceManagerRegistry>::Get()->GetDeviceManager(DeviceType::kCPU);
174 return std::make_shared<Generator>(device_mgr->CreateRandomGenerator(default_rng_seed_val, 0));
175}
176
177Maybe<Generator> MakeCUDAGenerator(int device_index) {
178 static auto device_mgr =

Callers

nothing calls this directly

Calls 3

GetFunction · 0.85
GetDeviceManagerMethod · 0.45
CreateRandomGeneratorMethod · 0.45

Tested by

no test coverage detected