Skip to content

Commit 22abfc4

Browse files
authored
support returned function in relay.build (#10502)
* fix InferType bug * fix InferType related bug * support returned function in relay.build * support returned function in relay.build * support returned function in relay.build * support returned function in relay.build * add warning about function returning function
1 parent 12f213a commit 22abfc4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/relay/backend/utils.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/*
23
* Licensed to the Apache Software Foundation (ASF) under one
34
* or more contributor license agreements. See the NOTICE file
@@ -139,6 +140,7 @@ int64_t CalculateRelayExprSizeBytes(const Type& expr_type) {
139140
return size;
140141
}
141142
auto tensor_type = expr_type.as<TensorTypeNode>();
143+
ICHECK(tensor_type);
142144
auto shape = tensor_type->shape;
143145
int num_of_elements = 1;
144146
for (const auto& dim_index_expr : shape) {

0 commit comments

Comments
 (0)