Skip to content

Commit 3b36470

Browse files
committed
Support BFloat16 in full
Partial fix for #7748. ghstack-source-id: 55ca1ba ghstack-comment-id: 2605970943 Pull Request resolved: #7821
1 parent 466d98f commit 3b36470

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

kernels/portable/cpu/op_full.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Tensor& full_out(
4040
CTYPE_VAL val;
4141
utils::extract_scalar(fill_value, &val);
4242

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

kernels/test/op_full_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class OpFullOutTest : public OperatorTest {
7070
test_ones_out<ScalarType::DTYPE>({2, 3, 4}); \
7171
}
7272

73-
ET_FORALL_REALH_TYPES(GENERATE_TEST)
73+
ET_FORALL_REALHBF16_TYPES(GENERATE_TEST)
7474

7575
TEST_F(OpFullOutTest, ValueOverflow) {
7676
if (torch::executor::testing::SupportedFeatures::get()->is_aten) {

0 commit comments

Comments
 (0)