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 2021/04/06 09:25:23 UTC

[GitHub] [tvm] K1504296 opened a new issue #7799: tests/scripts/task_python_integration.sh failing due to segmentaiton fault on aarch64.

K1504296 opened a new issue #7799:
URL: https://github.com/apache/tvm/issues/7799


   Hello,
   
   I've been trying to get more tests in the scripts directory working on aarch64 devices for use in the jenkins ci. 
   
   Currently I'm encountering a segmentation fault when running task_python_integration.sh : tests/python/relay/test_op_level2.py
   This segmentation fault occurs when running _compile() with an ic value of 16 and an oc value of 32.
   
   However, This doesn't occur when ic and oc are set to ic=17 and oc=29 or other values when testing skylake-avx512. Is this test causing issues on any devices other than aarch64 devices? If not does there need to be a conditional statement added to prevent this from executing on aarch64?
   
   Problem Area:
   https://github.com/apache/tvm/blob/32d80d6ed4987b1b1d26841cbb018f571c8eeb1d/tests/python/relay/test_op_level2.py#L1580
   
       fast_int8_dtypes = ("uint8", "int8", "int32")
       asm = _compile(
           ic=16,
           oc=32,
           target=target,
           data_layout="NCHW",
           kernel_layout="OIHW",
           dtypes=fast_int8_dtypes,
       )
   
   
   The error message:
   
       tests/python/relay/test_op_level2.py::test_conv2d_int8_intrinsics 'core-avx2' is not a recognized processor for this target (ignoring processor)
       'core-avx2' is not a recognized processor for this target (ignoring processor)
       'core-avx2' is not a recognized processor for this target (ignoring processor)
       'core-avx2' is not a recognized processor for this target (ignoring processor)
       'core-avx2' is not a recognized processor for this target (ignoring processor)
       'core-avx2' is not a recognized processor for this target (ignoring processor)
       Fatal Python error: Segmentation fault
       
       Current thread 0x0000ffff96394010 (most recent call first):
         File "/workspace/python/tvm/_ffi/_ctypes/packed_func.py", line 233 in __call__
         File "/workspace/python/tvm/runtime/module.py", line 138 in get_source
         File "/workspace/tests/python/relay/test_op_level2.py", line 1489 in _compile
         File "/workspace/tests/python/relay/test_op_level2.py", line 1588 in test_conv2d_int8_intrinsics
         File "/usr/local/lib/python3.6/dist-packages/_pytest/python.py", line 183 in pytest_pyfunc_call
         File "/usr/local/lib/python3.6/dist-packages/pluggy/callers.py", line 187 in _multicall
         File "/usr/local/lib/python3.6/dist-packages/pluggy/manager.py", line 87 in <lambda>
         File "/usr/local/lib/python3.6/dist-packages/pluggy/manager.py", line 93 in _hookexec
         File "/usr/local/lib/python3.6/dist-packages/pluggy/hooks.py", line 286 in __call__
         File "/usr/local/lib/python3.6/dist-packages/_pytest/python.py", line 1641 in runtest
         File "/usr/local/lib/python3.6/dist-packages/_pytest/runner.py", line 162 in pytest_runtest_call
         File "/usr/local/lib/python3.6/dist-packages/pluggy/callers.py", line 187 in _multicall
         File "/usr/local/lib/python3.6/dist-packages/pluggy/manager.py", line 87 in <lambda>
         File "/usr/local/lib/python3.6/dist-packages/pluggy/manager.py", line 93 in _hookexec
         File "/usr/local/lib/python3.6/dist-packages/pluggy/hooks.py", line 286 in __call__
         File "/usr/local/lib/python3.6/dist-packages/_pytest/runner.py", line 255 in <lambda>
         File "/usr/local/lib/python3.6/dist-packages/_pytest/runner.py", line 311 in from_call
         File "/usr/local/lib/python3.6/dist-packages/_pytest/runner.py", line 255 in call_runtest_hook
         File "/usr/local/lib/python3.6/dist-packages/_pytest/runner.py", line 215 in call_and_report
         File "/usr/local/lib/python3.6/dist-packages/_pytest/runner.py", line 126 in runtestprotocol
         File "/usr/local/lib/python3.6/dist-packages/_pytest/runner.py", line 109 in pytest_runtest_protocol
         File "/usr/local/lib/python3.6/dist-packages/pluggy/callers.py", line 187 in _multicall
         File "/usr/local/lib/python3.6/dist-packages/pluggy/manager.py", line 87 in <lambda>
         File "/usr/local/lib/python3.6/dist-packages/pluggy/manager.py", line 93 in _hookexec
         File "/usr/local/lib/python3.6/dist-packages/pluggy/hooks.py", line 286 in __call__
         File "/usr/local/lib/python3.6/dist-packages/_pytest/main.py", line 348 in pytest_runtestloop
         File "/usr/local/lib/python3.6/dist-packages/pluggy/callers.py", line 187 in _multicall
         File "/usr/local/lib/python3.6/dist-packages/pluggy/manager.py", line 87 in <lambda>
         File "/usr/local/lib/python3.6/dist-packages/pluggy/manager.py", line 93 in _hookexec
         File "/usr/local/lib/python3.6/dist-packages/pluggy/hooks.py", line 286 in __call__
         File "/usr/local/lib/python3.6/dist-packages/_pytest/main.py", line 323 in _main
         File "/usr/local/lib/python3.6/dist-packages/_pytest/main.py", line 269 in wrap_session
         File "/usr/local/lib/python3.6/dist-packages/_pytest/main.py", line 316 in pytest_cmdline_main
         File "/usr/local/lib/python3.6/dist-packages/pluggy/callers.py", line 187 in _multicall
         File "/usr/local/lib/python3.6/dist-packages/pluggy/manager.py", line 87 in <lambda>
         File "/usr/local/lib/python3.6/dist-packages/pluggy/manager.py", line 93 in _hookexec
         File "/usr/local/lib/python3.6/dist-packages/pluggy/hooks.py", line 286 in __call__
         File "/usr/local/lib/python3.6/dist-packages/_pytest/config/__init__.py", line 163 in main
         File "/usr/local/lib/python3.6/dist-packages/_pytest/config/__init__.py", line 185 in console_main
         File "/usr/local/lib/python3.6/dist-packages/pytest/__main__.py", line 5 in <module>
         File "/usr/lib/python3.6/runpy.py", line 85 in _run_code
         File "/usr/lib/python3.6/runpy.py", line 193 in _run_module_as_main
       tests/scripts/setup-pytest-env.sh: line 35: 41140 Segmentation fault      (core dumped) TVM_FFI=${ffi_type} python3 -m pytest -o "junit_suite_name=${test_suite_name}-${ffi_type}" "--junit-xml=${TVM_PYTEST_RESULT_DIR}/${test_suite_name}-${ffi_type}.xml" "--junit-prefix=${ffi_type}" "$@"
   
   
   
   


-- 
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



[GitHub] [tvm] K1504296 commented on issue #7799: tests/scripts/task_python_integration.sh failing due to segmentaiton fault on aarch64.

Posted by GitBox <gi...@apache.org>.
K1504296 commented on issue #7799:
URL: https://github.com/apache/tvm/issues/7799#issuecomment-822023089


   It seems to be a problem related to LLVM. LLVM 6.0 returns a Segmentation Fault; however, LLVM 10.0 gets stuck during execution. Running with gdb and LLVM 10.0 the following is returned after interrupting the execution: 
   
   ```
   Thread 1 "python3" received signal SIGINT, Interrupt.
   0x0000ffff90fd60e8 in ?? () from /usr/lib/llvm-10/lib/libLLVM-10.so.1
   ```
   The segmentation fault occurs when trying to get the assembly code of the TVM model via : lib.get_source("asm") with an oc value of 32.
   
   Here is a minimal example which still causes the segmentation fault on aarch64: 
   
   ```
   import numpy as np
   import tvm
   from tvm import relay
   from tvm.relay import transform
    
   def _compile(ic, oc, target, data_layout, kernel_layout, dtypes):
           input_dtype, weight_dtype, output_dtype = dtypes
    
           n, h, w, ch, cw = 1, 64, 64, 3, 3
           data_shape = (n, ic, h, w)
           x = relay.var("x", relay.TensorType(data_shape, input_dtype))
           kernel_shape = (oc, ic, ch, cw)
    
           weight = relay.var("weight", relay.TensorType(kernel_shape, weight_dtype))
           y = relay.nn.conv2d(
               x,
               weight,
               kernel_size=(ch, cw),
               channels=oc,
               padding=(1, 1),
               dilation=(1, 1),
               data_layout=data_layout,
               kernel_layout=kernel_layout,
               out_dtype=output_dtype,
           )
           func = relay.Function([x, weight], y)
           wdata = np.random.rand(*kernel_shape) * 10
           parameters = {"weight": tvm.nd.array(wdata.astype(weight_dtype))}
    
           with tvm.transform.PassContext(opt_level=3):
               graph, lib, params = relay.build(func, target, params=parameters)
           assembly = lib.get_source("asm")
           return assembly
    
   target = "llvm -mcpu=core-avx2"
   fast_int8_dtypes = ("uint8", "int8", "int32")
   asm = _compile(
           ic=16,
           oc=32,
           target=target,
           data_layout="NCHW",
           kernel_layout="OIHW",
           dtypes=fast_int8_dtypes,
    )
   ```


-- 
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