[TF:XLA] Allow fallback to TF:Classic when resource variables have changed shape or type.
PiperOrigin-RevId: 278868665 Change-Id: Iaec795c460cf7c34160ad503cd9e704fd7453fb4
This commit is contained in:
parent
b9be248fd3
commit
965f4b71f0
@ -92,14 +92,14 @@ Status XlaResource::SetTypeAndShape(DataType type, const TensorShape& shape) {
|
|||||||
"'' to an invalid type");
|
"'' to an invalid type");
|
||||||
}
|
}
|
||||||
if (initialized() && type_ != type) {
|
if (initialized() && type_ != type) {
|
||||||
return errors::InvalidArgument("Type of resource ", name_,
|
return errors::Unimplemented("Type of resource ", name_,
|
||||||
" cannot be changed after initialization: "
|
" cannot be changed after initialization: "
|
||||||
"old type was ",
|
"old type was ",
|
||||||
DataTypeString(type_), ", new type is ",
|
DataTypeString(type_), ", new type is ",
|
||||||
DataTypeString(type));
|
DataTypeString(type));
|
||||||
}
|
}
|
||||||
if (initialized() && shape_ != shape) {
|
if (initialized() && shape_ != shape) {
|
||||||
return errors::InvalidArgument("Shape of resource ", name_,
|
return errors::Unimplemented("Shape of resource ", name_,
|
||||||
" cannot be changed after initialization: "
|
" cannot be changed after initialization: "
|
||||||
"old shape was ",
|
"old shape was ",
|
||||||
shape_.DebugString(), ", new shape is ",
|
shape_.DebugString(), ", new shape is ",
|
||||||
|
Loading…
Reference in New Issue
Block a user