File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
tensorflow/compiler/xla/service Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ limitations under the License.
27
27
#include " tensorflow/compiler/xla/status_macros.h"
28
28
#include " tensorflow/compiler/xla/types.h"
29
29
#include " tensorflow/compiler/xla/util.h"
30
+ #include " tensorflow/core/platform/errors.h"
30
31
#include " tensorflow/core/platform/logging.h"
31
32
32
33
namespace xla {
@@ -130,9 +131,10 @@ Status HloPassPipeline::RunInvariantCheckers(
130
131
if (!changed_status.ok ()) {
131
132
VLOG (2 ) << " Failed invariant check:" ;
132
133
XLA_VLOG_LINES (2 , hlo->ToString ());
133
- return Status (changed_status.status ().code (),
134
- absl::StrCat (changed_status.status ().error_message (),
135
- " \n\n Failed after " , after_pass_name));
134
+ return tensorflow::errors::CreateWithUpdatedMessage (
135
+ changed_status.status (),
136
+ absl::StrCat (changed_status.status ().error_message (),
137
+ " \n\n Failed after " , after_pass_name));
136
138
}
137
139
TF_RET_CHECK (!changed_status.ValueOrDie ())
138
140
<< " invariant checkers must not change the graph" ;
Original file line number Diff line number Diff line change @@ -240,9 +240,10 @@ Service::ResolveAndValidateArguments(
240
240
for (size_t i = 0 ; i < arguments.size (); ++i) {
241
241
auto buffer_status = allocation_tracker_.Resolve (*arguments[i]);
242
242
if (!buffer_status.ok ()) {
243
- return Status (buffer_status.status ().code (),
244
- StrCat (buffer_status.status ().error_message (), " , " ,
245
- " failed to resolve allocation for parameter " , i));
243
+ return tensorflow::errors::CreateWithUpdatedMessage (
244
+ buffer_status.status (),
245
+ StrCat (buffer_status.status ().error_message (), " , " ,
246
+ " failed to resolve allocation for parameter " , i));
246
247
}
247
248
auto replicated_buffers = buffer_status.ValueOrDie ();
248
249
CHECK_EQ (options_.number_of_replicas (), replicated_buffers.size ());
You can’t perform that action at this time.
0 commit comments