Jupiterghy opened a new issue, #16991: URL: https://github.com/apache/tvm/issues/16991
Executing a sequence of Relay transformations iteratively using a custom script results in a segmentation fault (Segmentation fault (core dumped)). This issue seems to be related to the quantity of transformations applied rather than the specific optimizations in the `optimizations` array. ### Actual behavior `Segmentation fault (core dumped)` ### Environment - Operating System: Ubuntu 18.04.5 - TVM version: 0.15.dev0 - ONNX: 1.15.0 ### Steps to reproduce 1. Download the [ONNX model](https://github.com/Jupiterghy/onnx_model/blob/main/model_113.onnx) 2. Execute the script: ```python import onnx import tvm from tvm import relay def mr1(mod): optimizations = [tvm.relay.transform.CombineParallelBatchMatmul(), tvm.relay.transform.CombineParallelConv2D(), tvm.relay.transform.CombineParallelDense(), tvm.relay.transform.DeadCodeElimination(), tvm.relay.transform.DefuseOps(), tvm.relay.transform.DivToMul(), tvm.relay.transform.DynamicToStatic(), tvm.relay.transform.EliminateCommonSubexpr(), tvm.relay.transform.EtaExpand(), tvm.relay.transform.FakeQuantizationToInteger(), tvm.relay.transform.FastMath(), tvm.relay.transform.FirstOrderGradient(), tvm.relay.transform.FlattenAtrousConv(), tvm.relay.transform.FoldConstant(), tvm.relay.transform.FoldExplicitPadding(), tvm.relay.transform.FoldScaleAxis(), tvm.relay.transform.ForwardFoldScaleAxis(), tvm.relay.transform.InferType(), tvm.relay.transform.Inline(), tvm.relay.transform.LambdaLift(), tvm.relay.transform.LazyGradientInit(), tvm.relay.transform.ManifestLifetimes(), tvm.relay.transform.MergeCompilerRegions(), tvm.relay.transform.PartialEvaluate(), tvm.relay.transform.Part itionGraph(), tvm.relay.transform.RemoveUnusedFunctions(), tvm.relay.transform.SimplifyExpr(), tvm.relay.transform.SimplifyInference()] for i in range(len(optimizations)): for j in range(i + 1, len(optimizations)): opt1 = optimizations[i] opt2 = optimizations[j] try: module = mod module = tvm.relay.transform.InferType()(module) module_once = opt1(opt2(module)) except Exception as e: continue if __name__ == "__main__": model_file = 'model.onnx' onnx_model = onnx.load(model_file) shape_dict = {'v10_0': [], 'v9_0': []} mod, params = relay.frontend.from_onnx(onnx_model, shape_dict, freeze_params=True) mr1(mod) ``` ### Triage * needs-triage -- 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. To unsubscribe, e-mail: commits-unsubscr...@tvm.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org