OpLevelCostEstimator::GetDeviceInfo() returns GFLOPs/sec and GB/sec of the assumed machine, but currently it assumes the device type is either CPU or GPU. We didn't expect other device types would be passed during the Grappler optimization as transfer operations such as _Send and _Recv are added when a graph actually runs. In some occasions, we encountered the input graph includes _HostSend op (it is possible that the graph includes _Send or _Recv ops; that happened in some test cases). Device type not CPU / GPU currently causes crash; to avoid such a case, we assume unknown device type as transfer operations over PCIe; setting default PCIe x16 gen3 bandwidth to avoid crash. As the GetDeviceInfo() method is virtual, one may override this method if more precise device info is needed. PiperOrigin-RevId: 356865551 Change-Id: Icf1f39e5da81f9c627aa01e479f437184a13eed3 |
||
---|---|---|
.. | ||
graph_properties_testdata | ||
analytical_cost_estimator_test.cc | ||
analytical_cost_estimator.cc | ||
analytical_cost_estimator.h | ||
BUILD | ||
cost_estimator_test.cc | ||
cost_estimator.cc | ||
cost_estimator.h | ||
graph_memory_test.cc | ||
graph_memory.cc | ||
graph_memory.h | ||
graph_properties_test.cc | ||
graph_properties.cc | ||
graph_properties.h | ||
measuring_cost_estimator.cc | ||
measuring_cost_estimator.h | ||
op_context.h | ||
op_level_cost_estimator_test.cc | ||
op_level_cost_estimator.cc | ||
op_level_cost_estimator.h | ||
op_performance_data.proto | ||
robust_stats_test.cc | ||
robust_stats.cc | ||
robust_stats.h | ||
utils_test.cc | ||
utils.cc | ||
utils.h | ||
virtual_placer_test.cc | ||
virtual_placer.cc | ||
virtual_placer.h | ||
virtual_scheduler_test.cc | ||
virtual_scheduler.cc | ||
virtual_scheduler.h |