| 27 | namespace oneflow { |
| 28 | |
| 29 | Maybe<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 | |
| 34 | py::tuple GetCudaDefaultGenerators() { |
| 35 | #ifdef WITH_CUDA |
no test coverage detected