@@ -219,7 +219,7 @@ class CuckooHashTableOfTensors final : public LookupInterface {
219
219
LaunchTensorsFind<CPUDevice, K, V> launcher (value_dim);
220
220
launcher.launch (ctx, table_, key, value, default_value);
221
221
222
- return Status::OK () ;
222
+ return TFOkStatus ;
223
223
}
224
224
225
225
Status FindWithExists (OpKernelContext* ctx, const Tensor& key, Tensor* value,
@@ -229,7 +229,7 @@ class CuckooHashTableOfTensors final : public LookupInterface {
229
229
LaunchTensorsFindWithExists<CPUDevice, K, V> launcher (value_dim);
230
230
launcher.launch (ctx, table_, key, value, default_value, exists);
231
231
232
- return Status::OK () ;
232
+ return TFOkStatus ;
233
233
}
234
234
235
235
Status DoInsert (bool clear, OpKernelContext* ctx, const Tensor& keys,
@@ -243,7 +243,7 @@ class CuckooHashTableOfTensors final : public LookupInterface {
243
243
LaunchTensorsInsert<CPUDevice, K, V> launcher (value_dim);
244
244
launcher.launch (ctx, table_, keys, values);
245
245
246
- return Status::OK () ;
246
+ return TFOkStatus ;
247
247
}
248
248
249
249
Status DoAccum (bool clear, OpKernelContext* ctx, const Tensor& keys,
@@ -257,7 +257,7 @@ class CuckooHashTableOfTensors final : public LookupInterface {
257
257
LaunchTensorsAccum<CPUDevice, K, V> launcher (value_dim);
258
258
launcher.launch (ctx, table_, keys, values_or_deltas, exists);
259
259
260
- return Status::OK () ;
260
+ return TFOkStatus ;
261
261
}
262
262
263
263
Status Insert (OpKernelContext* ctx, const Tensor& keys,
@@ -272,12 +272,12 @@ class CuckooHashTableOfTensors final : public LookupInterface {
272
272
for (int64 i = 0 ; i < key_flat.size (); ++i) {
273
273
table_->erase (tensorflow::lookup::SubtleMustCopyIfIntegral (key_flat (i)));
274
274
}
275
- return Status::OK () ;
275
+ return TFOkStatus ;
276
276
}
277
277
278
278
Status Clear (OpKernelContext* ctx) {
279
279
table_->clear ();
280
- return Status::OK () ;
280
+ return TFOkStatus ;
281
281
}
282
282
283
283
Status Accum (OpKernelContext* ctx, const Tensor& keys,
@@ -304,7 +304,7 @@ class CuckooHashTableOfTensors final : public LookupInterface {
304
304
table_->dump ((K*)keys->tensor_data ().data (),
305
305
(V*)values->tensor_data ().data (), 0 , table_size);
306
306
307
- return Status::OK () ;
307
+ return TFOkStatus ;
308
308
}
309
309
310
310
Status SaveToFileSystemImpl (FileSystem* fs, const size_t value_dim,
@@ -319,7 +319,7 @@ class CuckooHashTableOfTensors final : public LookupInterface {
319
319
bool has_atomic_move = false ;
320
320
auto has_atomic_move_ret = fs->HasAtomicMove (filepath, &has_atomic_move);
321
321
bool need_tmp_file =
322
- (has_atomic_move == false ) || (has_atomic_move_ret != Status::OK () );
322
+ (has_atomic_move == false ) || (has_atomic_move_ret != TFOkStatus );
323
323
if (!need_tmp_file) {
324
324
key_tmpfilepath = key_filepath;
325
325
value_tmpfilepath = value_filepath;
@@ -387,7 +387,7 @@ class CuckooHashTableOfTensors final : public LookupInterface {
387
387
TF_RETURN_IF_ERROR (fs->RenameFile (value_tmpfilepath, value_filepath));
388
388
}
389
389
390
- return Status::OK () ;
390
+ return TFOkStatus ;
391
391
}
392
392
393
393
Status SaveToFileSystem (OpKernelContext* ctx, const string& dirpath,
@@ -461,7 +461,7 @@ class CuckooHashTableOfTensors final : public LookupInterface {
461
461
LOG (INFO) << " Finish loading " << key_size << " keys and values from "
462
462
<< key_filepath << " and " << value_filepath << " in total." ;
463
463
464
- return Status::OK () ;
464
+ return TFOkStatus ;
465
465
}
466
466
467
467
Status LoadFromFileSystem (OpKernelContext* ctx, const string& dirpath,
@@ -500,7 +500,7 @@ class CuckooHashTableOfTensors final : public LookupInterface {
500
500
string filepath = io::JoinPath (dirpath, file_name);
501
501
return LoadFromFileSystemImpl (fs, value_dim, filepath, buffer_size);
502
502
}
503
- return Status::OK () ;
503
+ return TFOkStatus ;
504
504
}
505
505
506
506
DataType key_dtype () const override { return DataTypeToEnum<K>::v (); }
@@ -557,7 +557,7 @@ class HashTableOpKernel : public OpKernel {
557
557
*container = h (0 );
558
558
*table_handle = h (1 );
559
559
}
560
- return Status::OK () ;
560
+ return TFOkStatus ;
561
561
}
562
562
563
563
Status GetResourceHashTable (StringPiece input_name, OpKernelContext* ctx,
0 commit comments