From ab56d310dde4d5e866b2a664cfa4db77b2967339 Mon Sep 17 00:00:00 2001 From: Philippe Tillet Date: Sat, 23 Jul 2022 20:08:03 -0700 Subject: [PATCH] [BACKEND][IR] Fixed up internal dtype size for booleans (1bit -> 8bit) (#600) --- lib/ir/type.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ir/type.cc b/lib/ir/type.cc index 43761f482..5667dcac5 100644 --- a/lib/ir/type.cc +++ b/lib/ir/type.cc @@ -27,7 +27,7 @@ unsigned type::get_primitive_size_in_bits() const { case BF16TyID: return 16; case FP32TyID: return 32; case FP64TyID: return 64; - case IntegerTyID: return ((integer_type*)(this))->get_bitwidth(); + case IntegerTyID: return std::max(8, ((integer_type*)(this))->get_bitwidth()); case BlockTyID: return ((block_type*)(this))->get_bitwidth(); default: return 0; }