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

Function CreateGenerator

oneflow/api/python/framework/random_generator.cpp:29–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27namespace oneflow {
28
29Maybe<one::Generator> CreateGenerator(const std::string& device_str) {
30 auto [device_name, device_index, rematable] = *JUST(ParseDeviceString(device_str));
31 return one::MakeGenerator(device_name, device_index);
32}
33
34py::tuple GetCudaDefaultGenerators() {
35#ifdef WITH_CUDA

Callers 1

Calls 2

ParseDeviceStringFunction · 0.85
MakeGeneratorFunction · 0.85

Tested by

no test coverage detected