Skip to content

Commit 8c9a516

Browse files
zonglinpengfacebook-github-bot
authored andcommitted
enable fp32 permute
Summary: titled Differential Revision: D70796738
1 parent 6870763 commit 8c9a516

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

backends/cadence/fusion_g3/operators/op_permute_copy.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Tensor& permute_copy_out(
8989

9090
int inp_shape[kTensorDimensionLimit];
9191
int out_shape[kTensorDimensionLimit];
92+
int permute_vec[kTensorDimensionLimit];
9293

9394
/* input shapes and output shapes */
9495
for (auto i = 0; i < in_size.size(); i++) {
@@ -99,7 +100,6 @@ Tensor& permute_copy_out(
99100
out_shape[i] = out_size[i];
100101
}
101102

102-
int permute_vec[in.dim()];
103103
for (int i = 0; i < in.dim(); i++) {
104104
permute_vec[i] = (int)dims[i];
105105
}
@@ -112,7 +112,8 @@ Tensor& permute_copy_out(
112112
(out.scalar_type() == ScalarType::Char) ||
113113
(out.scalar_type() == ScalarType::UInt32) ||
114114
(out.scalar_type() == ScalarType::UInt16) ||
115-
(out.scalar_type() == ScalarType::Byte)) &&
115+
(out.scalar_type() == ScalarType::Byte) ||
116+
(out.scalar_type() == ScalarType::Float)) &&
116117
(in.dim() <= 5)) {
117118
XT_KERNEL_CHECK(
118119
ctx,
@@ -156,4 +157,4 @@ Tensor& permute_copy_out(
156157
} // namespace native
157158
} // namespace G3
158159
} // namespace impl
159-
} // namespace cadence
160+
} // namespace cadence

0 commit comments

Comments
 (0)