Skip to content

Commit

Permalink
[dalgona] Add bool type (#14248)
Browse files Browse the repository at this point in the history
This commit adds bool type in numpyArray function.

ONE-DCO-1.0-Signed-off-by: seongwoo <[email protected]>
  • Loading branch information
mhs4670go authored Oct 24, 2024
1 parent a1612da commit 9d5e68d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/dalgona/src/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ py::array numpyArray(const Tensor *tensor)
return py::array_t<int64_t, py::array::c_style>(shape, tensor->data<int64_t>());
case loco::DataType::U8:
return py::array_t<uint8_t, py::array::c_style>(shape, tensor->data<uint8_t>());
case loco::DataType::BOOL:
return py::array_t<bool, py::array::c_style>(shape, tensor->data<bool>());
default:
throw std::runtime_error("Unsupported data type");
}
Expand Down

0 comments on commit 9d5e68d

Please sign in to comment.