Get if memory growth is enabled for a PhysicalDevice. A PhysicalDevice with memory growth set will not allocate all memory on the device upfront. For example: ```python physical_devices = config.experimental.list_physical_devices('GPU') assert len(physical_devices) > 0, "Not enough GP
(device)
| 475 | |
| 476 | @tf_export('config.experimental.get_memory_growth') |
| 477 | def get_memory_growth(device): |
| 478 | """Get if memory growth is enabled for a PhysicalDevice. |
| 479 | |
| 480 | A PhysicalDevice with memory growth set will not allocate all memory on the |
| 481 | device upfront. |
| 482 | |
| 483 | For example: |
| 484 | |
| 485 | ```python |
| 486 | physical_devices = config.experimental.list_physical_devices('GPU') |
| 487 | assert len(physical_devices) > 0, "Not enough GPU hardware devices available" |
| 488 | tf.config.experimental.set_memory_growth(physical_devices[0], True) |
| 489 | assert tf.config.experimental.get_memory_growth(physical_devices[0]) == True |
| 490 | ``` |
| 491 | |
| 492 | Args: |
| 493 | device: PhysicalDevice to query |
| 494 | |
| 495 | Returns: |
| 496 | Current memory growth setting. |
| 497 | """ |
| 498 | return context.context().get_memory_growth(device) |
| 499 | |
| 500 | |
| 501 | @tf_export('config.experimental.set_memory_growth') |
nothing calls this directly
no test coverage detected