rkimball commented on a change in pull request #7832: URL: https://github.com/apache/tvm/pull/7832#discussion_r613561822
########## File path: tests/cpp/relay_dismantler_test.cc ########## @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#include <gtest/gtest.h> +#include <tvm/ir/expr.h> +#include <tvm/ir/type_functor.h> +#include <tvm/node/functor.h> +#include <tvm/node/structural_equal.h> +#include <tvm/relay/adt.h> +#include <tvm/relay/analysis.h> +#include <tvm/relay/expr.h> +#include <tvm/relay/expr_functor.h> +#include <tvm/relay/function.h> +#include <tvm/relay/op.h> +#include <tvm/relay/op_attr_types.h> +#include <tvm/relay/op_strategy.h> +#include <tvm/relay/transform.h> +#include <tvm/relay/type.h> +#include <tvm/runtime/packed_func.h> +#include <tvm/runtime/registry.h> +#include <tvm/te/operation.h> +#include <tvm/topi/broadcast.h> +#include <tvm/topi/generic/injective.h> + +using namespace tvm; +using namespace tvm::relay; + +TEST(Relay, OutOfStack) { + auto foo = [] { + auto add_op = relay::Op::Get("add"); + auto c_data = tvm::runtime::NDArray::Empty({1, 2, 3}, {kDLFloat, 32, 1}, {kDLCPU, 0}); + auto c1 = relay::Constant(c_data); + Call y1 = relay::Call(add_op, {c1, c1}); + for (int i = 0; i < 16'384; i++) { Review comment: I was using ubuntu 20.04. I do have 64G RAM but I don't think that changes the stack size. When I type `ulimit -s` to print the stack size I see 8182K. What do you see? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
