Skip to content

Commit a701d82

Browse files
JacobSzwejbkafacebook-github-bot
authored andcommitted
preserve is fine in our ops (#2572)
Summary: Pull Request resolved: #2572 hit this when trying to run llama. Preserve should be fine since our input mem format is contiguous already. bypass-github-export-checks Reviewed By: SS-JIA Differential Revision: D55215189 fbshipit-source-id: 1b54d457d58609a11067b83c0ec1781674295da1
1 parent b7c146a commit a701d82

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernels/portable/cpu/op_full_like.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ Tensor& full_like_out(
2727
if (memory_format.has_value()) {
2828
ET_KERNEL_CHECK_MSG(
2929
ctx,
30-
memory_format.value() == MemoryFormat::Contiguous,
30+
memory_format.value() == MemoryFormat::Contiguous ||
31+
memory_format.value() == MemoryFormat::Preserve,
3132
InvalidArgument,
3233
out,
3334
"memory_format must be contiguous");

0 commit comments

Comments
 (0)