tensorflow/compiler/mlir/tensorflow/utils/tpu_rewrite_device_util.cc
// Checks if device coordinate is outside of topology mesh shape bounds.
Checks if device coordinate is outside of topology mesh shape bounds.
Checks if device coordinate is outside of topology mesh shape bounds .
bool DeviceCoordinateOutOfBound(int x, int y, int z, int core, int bound_x,
                                int bound_y, int bound_z, int bound_core) {
  return x < 0 || x >= bound_x || y < 0 || y >= bound_y || z < 0 ||
         z >= bound_z || core < 0 || core >= bound_core;
}
bool DeviceCoordinateOutOfBound ( int x , int y , int z , int core , int bound_x , int bound_y , int bound_z , int bound_core ) { return x < 0 || x >= bound_x || y < 0 || y >= bound_y || z < 0 || z >= bound_z || core < 0 || core >= bound_core ; }
Checks if device coordinate is outside of topology mesh shape bounds.
Checks if device coordinate is outside of topology mesh shape bounds .