tf.experimental.dtensor.check_layout

Asserts that the layout of the DTensor is layout.

tensor A DTensor whose layout is to be checked.
layout The Layout to compare against.

ValueError If the layout of tensor does not match the supplied layout.