We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a102fe commit d14208fCopy full SHA for d14208f
deps/ReactantExtra/API.cpp
@@ -2628,3 +2628,15 @@ extern "C" void addSdyPropagationPipeline(
2628
0};
2629
mlir::sdy::addPropagationPipeline(pm, options);
2630
}
2631
+
2632
+extern "C" HeldIfrtArray *ifrt_copy_array(HeldIfrtArray *array) {
2633
+ auto pjrtArray = dyn_cast<ifrt::PjRtArray>(array->obj().get());
2634
+ if (pjrtArray) {
2635
+ std::optional<ifrt::DeviceListRef> devices;
2636
+ std::optional<ifrt::MemoryKind> memory_kind;
2637
+ auto res = MyValueOrThrow(pjrtArray->Copy(
2638
+ devices, memory_kind, static_cast<ifrt::ArrayCopySemantics>(0)));
2639
+ return reactant::capture(res);
2640
+ }
2641
+ ReactantThrowError("Only ifrt-pjrt arrays are supported for now");
2642
+}
0 commit comments