[XLA] Move a CHECK into Layout verification
Sparse layouts that specify tiling should fail verification, not CHECK-fail in ToString. PiperOrigin-RevId: 233483254
This commit is contained in:
parent
d584984e82
commit
f5463b160c
@ -247,6 +247,10 @@ Layout CreateDefaultLayoutForRank(int64 rank) {
|
||||
}
|
||||
dimensions_in_layout[dim] = true;
|
||||
}
|
||||
} else {
|
||||
if (layout.tiles_size() != 0) {
|
||||
return InvalidArgument("Only dense layouts can be tiled.");
|
||||
}
|
||||
}
|
||||
|
||||
return Status::OK();
|
||||
|
Loading…
x
Reference in New Issue
Block a user