Add TransformShardedTileShape helper method to HloSharding
authorA. Unique TensorFlower <gardener@tensorflow.org>
Tue, 13 Mar 2018 18:34:23 +0000 (11:34 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Tue, 13 Mar 2018 18:41:36 +0000 (11:41 -0700)
commit9dcf033873007b48033b38b428af45abdef97ee7
treee628711dc43f262e0dea0a8095560aee0159a0a4
parent62c47147e78985f8df5b06df49232e26fd6124cb
Add TransformShardedTileShape helper method to HloSharding

It transforms an existing sharding to be compatible with a new shape
with an optional transform method to adjust the tile size for the
sharded dimensions.

PiperOrigin-RevId: 188903257
tensorflow/compiler/xla/service/hlo_sharding.cc
tensorflow/compiler/xla/service/hlo_sharding.h
tensorflow/compiler/xla/service/hlo_sharding_test.cc