| 175 | } |
| 176 | |
| 177 | Maybe<Generator> MakeCUDAGenerator(int device_index) { |
| 178 | static auto device_mgr = |
| 179 | Singleton<ep::DeviceManagerRegistry>::Get()->GetDeviceManager(DeviceType::kCUDA); |
| 180 | if (device_index == -1) { device_index = GlobalProcessCtx::LocalRank(); } |
| 181 | return std::make_shared<Generator>( |
| 182 | device_mgr->CreateRandomGenerator(default_rng_seed_val, device_index)); |
| 183 | } |
| 184 | |
| 185 | Maybe<void> ManualSeedAllCudaGenerator(uint64_t seed) { |
| 186 | #ifdef WITH_CUDA |
nothing calls this directly
no test coverage detected