From fedabe772f76c06908e9d7f1c30161a6e7f575d0 Mon Sep 17 00:00:00 2001 From: Yi Xu Date: Mon, 23 May 2022 14:47:32 +0800 Subject: [PATCH] [Bug] [type] Fix frontend type check for reading a whole bit_struct --- taichi/ir/frontend_ir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/taichi/ir/frontend_ir.cpp b/taichi/ir/frontend_ir.cpp index 745e82e6dc752..e5fcb6d18cf83 100644 --- a/taichi/ir/frontend_ir.cpp +++ b/taichi/ir/frontend_ir.cpp @@ -318,7 +318,8 @@ void GlobalVariableExpression::flatten(FlattenContext *ctx) { void GlobalPtrExpression::type_check(CompileConfig *) { // Currently, dimension compatibility check happens in Python if (snode != nullptr) { - ret_type = snode->dt; + TI_ASSERT(snode->dt->is()); + ret_type = snode->dt->cast()->get_physical_type(); } else if (var.is()) { ret_type = var.cast()->snode->dt->get_compute_type();