Skip to content

Commit 5f7524f

Browse files
authored
Merge pull request #2886 from ROCm/ci_fix_distributed_save_test_2.19
Fix distributed save test 2.19
2 parents 592bba7 + b80f162 commit 5f7524f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tensorflow/core/data/compression_utils.cc

+15
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,23 @@ absl::Status UncompressElement(const CompressedElement& compressed,
234234
return absl::OkStatus();
235235
}
236236

237+
namespace {
238+
237239
REGISTER_UNARY_VARIANT_DECODE_FUNCTION(CompressedElement,
238240
"tensorflow.data.CompressedElement");
239241

242+
Status CopyCompressedElementOnDevice(
243+
const CompressedElement& from, CompressedElement* to,
244+
std::function<Status(const Tensor&, Tensor*)> copy_tensor_fn) {
245+
*to = from;
246+
return OkStatus();
247+
}
248+
249+
INTERNAL_REGISTER_UNARY_VARIANT_DEVICE_COPY_FUNCTION(
250+
CompressedElement, VariantDeviceCopyDirection::DEVICE_TO_HOST,
251+
CopyCompressedElementOnDevice);
252+
253+
} // namespace
254+
240255
} // namespace data
241256
} // namespace tensorflow

0 commit comments

Comments
 (0)