diff --git a/src/ffi/ffi_infinitensor.cc b/src/ffi/ffi_infinitensor.cc index f979b03c..c2d35051 100644 --- a/src/ffi/ffi_infinitensor.cc +++ b/src/ffi/ffi_infinitensor.cc @@ -95,17 +95,17 @@ static int tensor_dtype(Tensor t) { static int concat_axis_of(Operator op) { IT_ASSERT(op->getOpType() == OpType::Concat); - return reinterpret_cast(op.get())->getDim(); + return dynamic_cast(op.get())->getDim(); } static int gather_axis_of(Operator op) { IT_ASSERT(op->getOpType() == OpType::Gather); - return reinterpret_cast(op.get())->getAxis(); + return dynamic_cast(op.get())->getAxis(); } static Shape reshape_shape_of(Operator op) { IT_ASSERT(op->getOpType() == OpType::Reshape); - return reinterpret_cast(op.get())->getShape(); + return dynamic_cast(op.get())->getShape(); } void init_graph_builder(py::module &m) {