Skip to content

Commit d7d74f4

Browse files
committed
Do not use BNNS copy when dtypes differ in CoreML
1 parent 574e109 commit d7d74f4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

backends/apple/coreml/runtime/delegate/multiarray.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ bool init_bnns_descriptor(BNNSNDArrayDescriptor& bnns_descriptor, const MultiArr
123123
}
124124

125125
bool copy_using_bnns(const MultiArray& src, MultiArray& dst) {
126+
if (src.layout().dataType() != dst.layout().dataType()) {
127+
return false;
128+
}
126129
if (dst.layout().num_bytes() < src.layout().num_bytes()) {
127130
return false;
128131
}

0 commit comments

Comments
 (0)