| 341 | } |
| 342 | |
| 343 | void CheckMemoryMethod() { |
| 344 | PADDLE_ENFORCE_NE( |
| 345 | memory_method_.get(), |
| 346 | nullptr, |
| 347 | common::errors::Unavailable( |
| 348 | "memory_method_ in MemoryUtils is not " |
| 349 | "initialized yet. You need init it first. If you compiled with " |
| 350 | "Fluid. You can call InitMemoryMethod() for initialization.")); |
| 351 | } |
| 352 | |
| 353 | #if (defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)) && \ |
| 354 | (defined(PADDLE_WITH_NCCL) || defined(PADDLE_WITH_RCCL)) |