You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/01/07 23:15:58 UTC
[GitHub] [incubator-tvm] trevor-m commented on issue #4534: [Relay] Dead
code elimination pass blows up call stack
trevor-m commented on issue #4534: [Relay] Dead code elimination pass blows up call stack
URL: https://github.com/apache/incubator-tvm/issues/4534#issuecomment-571817854
I was getting a segfault just trying to run resnet152_v1 with the script below. Smaller models worked fine. Once I increased the stack limit using `ulimit -s unlimited`, the segfaults stopped.
```
import numpy as np
import time
import tvm
from tvm import relay
import tvm.relay.testing
import tvm.relay.transform
from tvm.contrib import graph_runtime
import mxnet
from mxnet.gluon.model_zoo.vision import get_model
dtype = 'float32'
input_shape = (1, 3, 224, 224)
i_data = np.random.uniform(0, 1, input_shape).astype(dtype)
block = get_model('resnet152_v1', pretrained=True)
mod, params = relay.frontend.from_mxnet(block, shape={'data': input_shape}, dtype=dtype)
with relay.build_config(opt_level=3):
graph, lib, params = relay.build(mod, "cuda", params=params)
mod = graph_runtime.create(graph, lib, ctx=tvm.gpu(0))
mod.set_input(**params)
for i in range(10):
mod.run(data=i_data)
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services