Enable memory_space verification for fusion input parameters.

PiperOrigin-RevId: 310670198
Change-Id: I915172aded7a78e8a6f2203859b586493e83ab43
This commit is contained in:
A. Unique TensorFlower 2020-05-08 19:14:57 -07:00 committed by TensorFlower Gardener
parent d2fdc7b012
commit 4ece5df0d8

View File

@ -697,11 +697,7 @@ Status ShapeVerifier::HandleFusion(HloInstruction* fusion) {
}
for (HloInstruction* fused_param : fused_parameters) {
int64 param_no = fused_param->parameter_number();
// Since fusion buffers aren't materialized, fusion parameters will not have
// the same memory space as the fusion operand.
if (!ShapesSame(fused_param->shape(), fusion->operand(param_no)->shape(),
/*minor_to_major_only=*/false,
/*ignore_memory_space=*/true)) {
if (!ShapesSame(fused_param->shape(), fusion->operand(param_no)->shape())) {
return InternalError(
"Shape mismatch between parameter number %d and its operand in "
"%s.",