Skip to content

Commit fa3e694

Browse files
committed
Support BFloat16 in full_like
Partial fix for #7748. ghstack-source-id: 0c618df ghstack-comment-id: 2605975252 Pull Request resolved: #7822
1 parent 466d98f commit fa3e694

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

kernels/portable/cpu/op_full_like.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Tensor& full_like_out(
5656
CTYPE_VAL val;
5757
utils::extract_scalar(fill_value, &val);
5858

59-
ET_SWITCH_REALHB_TYPES(out_type, ctx, name, CTYPE_OUT, [&] {
59+
ET_SWITCH_REALHBBF16_TYPES(out_type, ctx, name, CTYPE_OUT, [&] {
6060
CTYPE_OUT val_casted = static_cast<CTYPE_OUT>(val);
6161
auto data_out = out.mutable_data_ptr<CTYPE_OUT>();
6262
for (size_t i = 0; i < out.numel(); ++i) {

kernels/test/op_full_like_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void OpFullLikeTest::test_full_like_out<ScalarType::Bool>() {
8787

8888
TEST_F(OpFullLikeTest, AllRealOutputPasses) {
8989
#define TEST_ENTRY(ctype, dtype) test_full_like_out<ScalarType::dtype>();
90-
ET_FORALL_REAL_TYPES_AND(Bool, TEST_ENTRY);
90+
ET_FORALL_REALHBF16_TYPES(TEST_ENTRY);
9191
#undef TEST_ENTRY
9292
}
9393

0 commit comments

Comments
 (0)