Skip to content

Commit 091bc4a

Browse files
authored
Support Half/BFloat16 in runner_util/inputs_portable (#7750)
Partial fix for #7748.
1 parent dabd72f commit 091bc4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extension/runner_util/inputs_portable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ Error fill_ones(torch::executor::Tensor tensor) {
3636
std::fill( \
3737
tensor.mutable_data_ptr<T>(), \
3838
tensor.mutable_data_ptr<T>() + tensor.numel(), \
39-
1); \
39+
T(1)); \
4040
break;
4141

4242
switch (tensor.scalar_type()) {
43-
ET_FORALL_REAL_TYPES_AND(Bool, FILL_CASE)
43+
ET_FORALL_REALHBBF16_TYPES(FILL_CASE)
4444
default:
4545
ET_LOG(Error, "Unsupported scalar type %d", (int)tensor.scalar_type());
4646
return Error::InvalidArgument;

0 commit comments

Comments
 (0)