From f258819ce13a1852c8eeaf882675f15e8dc182c4 Mon Sep 17 00:00:00 2001 From: Lunderberg Date: Wed, 4 Aug 2021 21:58:32 -0500 Subject: [PATCH] [Bugfix][Target] Correct passing of target-queried bool/int parameters (#8660) Co-authored-by: Eric Lunderberg --- src/target/target.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/target/target.cc b/src/target/target.cc index a2a10da6d79a4..f2f3fbcb0cc56 100644 --- a/src/target/target.cc +++ b/src/target/target.cc @@ -768,9 +768,9 @@ ObjectPtr TargetInternal::FromConfig(std::unordered_map(ret)); - } else if (type_info.type_index == Bool::ContainerType::_GetOrAllocRuntimeTypeIndex()) { attrs[key] = Integer(static_cast(ret)); + } else if (type_info.type_index == Bool::ContainerType::_GetOrAllocRuntimeTypeIndex()) { + attrs[key] = Bool(static_cast(ret)); } else { LOG(FATAL) << "Expected " << type_info.type_key << " parameter for attribute '" << key << "', but received integer from device api";