Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeoutError when runing MLIR example #792

Open
sofan110 opened this issue Apr 4, 2023 · 2 comments
Open

TimeoutError when runing MLIR example #792

sofan110 opened this issue Apr 4, 2023 · 2 comments
Labels
Bug Something isn't working

Comments

@sofan110
Copy link

sofan110 commented Apr 4, 2023

❓ Questions and Help

I use compiler_gym 0.2.5 installed with MLIR env and try to execute the example code

import gym
from compiler_gym.wrappers.mlir import make_mlir_rl_wrapper_env
env = gym.make("mlir-v0")
wrapper = make_mlir_rl_wrapper_env(env)
wrapper.reset()
observation, reward, done, info = wrapper.step(wrapper.action_space.sample())

but I get the following error:

RuntimeError: {'error_type': 'TimeoutError', 'error_details': "Command '$CC -Ofast /dev/shm/compiler_gym_wufan/s/0404T150542-962363-5241/scratch-42e8-a740/out.mlir.ll -mllvm -enable-matrix -mllvm -matrix-allow-contract -mllvm -matrix-default-layout=row-major -c -o /dev/shm/compiler_gym_wufan/s/0404T150542-962363-5241/scratch-42e8-a740/benchmark_mlir.o /workspace/S/wufan/conda/anaconda3/envs/MLIR/lib/python3.8/site-packages/compiler_gym/envs/mlir/service/llvm/lib/libMLIRExecutionEngine.a -g3 && $CC -o /dev/shm/compiler_gym_wufan/s/0404T150542-962363-5241/scratch-42e8-a740/benchmark_main -I/workspace/S/wufan/conda/anaconda3/envs/MLIR/lib/python3.8/site-packages/compiler_gym/envs/mlir/service/llvm/include/ -I/workspace/S/wufan/conda/anaconda3/envs/MLIR/lib/python3.8/site-packages/compiler_gym/envs/mlir/service/google_benchmark/include/ -lstdc++ -lm -pthread -v -g3 /dev/shm/compiler_gym_wufan/s/0404T150542-962363-5241/scratch-42e8-a740/benchmark_main.cc /dev/shm/compiler_gym_wufan/s/0404T150542-962363-5241/scratch-42e8-a740/benchmark_mlir.o /workspace/S/wufan/conda/anaconda3/envs/MLIR/lib/python3.8/site-packages/compiler_gym/envs/mlir/service/google_benchmark/lib/libbenchmark.a' failed to complete within 120 seconds (300.0 seconds)"}

@sofan110 sofan110 added the Question Further information is requested label Apr 4, 2023
@ChrisCummins
Copy link
Contributor

Hi @sofan110, let me CC the authors of the MLIR environment as they may be able to help you out: @KyleHerndon, @sogartar.

In the meantime, could you please add the extra system information needed to diagnose issues (click on "bug report" here for the template).

Cheers,
Chris

@ChrisCummins ChrisCummins added Bug Something isn't working and removed Question Further information is requested labels Apr 4, 2023
@sofan110
Copy link
Author

sofan110 commented Apr 6, 2023

🐛 Bug

TimeoutError when running mlir_rl_wrapper_env.step()

To Reproduce

Steps to reproduce the behavior:

  1. install compilergym with cmake
  2. run the demo code

Environment

CompilerGym: 0.2.5
Is debug build: N/A

Python version: 3.8.16 (default, Mar 2 2023, 03:21:46) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-3.10.0-1127.13.1.el7.x86_64-x86_64-with-glibc2.17

OS: CentOS Linux 7 (Core) (x86_64)
GCC version: (GCC) 9.3.0
Clang version: Could not collect
CMake version: 3.21.7
Libc version: glibc-2.17

Versions of all installed libraries:
[pip3] absl-py==1.4.0
[pip3] asttokens==2.2.1
[pip3] backcall==0.2.0
[pip3] certifi==2022.12.7
[pip3] charset-normalizer==3.1.0
[pip3] cloudpickle==2.2.1
[pip3] comm==0.1.2
[pip3] compiler-gym==0.2.5
[pip3] debugpy==1.6.6
[pip3] decorator==5.1.1
[pip3] Deprecated==1.2.13
[pip3] docker==6.0.1
[pip3] executing==1.2.0
[pip3] fasteners==0.18
[pip3] grpcio==1.43.0
[pip3] grpcio-tools==1.43.0
[pip3] gym==0.21.0
[pip3] humanize==4.6.0
[pip3] idna==3.4
[pip3] importlib-metadata==6.1.0
[pip3] ipykernel==6.21.3
[pip3] ipython==8.11.0
[pip3] jedi==0.18.2
[pip3] jupyter_client==8.0.3
[pip3] jupyter_core==5.3.0
[pip3] loop-tool-py==0.0.6
[pip3] matplotlib-inline==0.1.6
[pip3] nest-asyncio==1.5.6
[pip3] networkx==3.0
[pip3] numpy==1.24.2
[pip3] packaging==23.0
[pip3] parso==0.8.3
[pip3] pexpect==4.8.0
[pip3] pickleshare==0.7.5
[pip3] pip==23.0.1
[pip3] platformdirs==3.1.1
[pip3] prompt-toolkit==3.0.38
[pip3] protobuf==3.20.3
[pip3] psutil==5.9.4
[pip3] ptyprocess==0.7.0
[pip3] pure-eval==0.2.2
[pip3] pybind11==2.10.4
[pip3] pydantic==1.10.6
[pip3] Pygments==2.14.0
[pip3] python-dateutil==2.8.2
[pip3] pyzmq==25.0.1
[pip3] requests==2.28.2
[pip3] setuptools==65.6.3
[pip3] six==1.16.0
[pip3] stack-data==0.6.2
[pip3] tabulate==0.9.0
[pip3] tornado==6.2
[pip3] traitlets==5.9.0
[pip3] typing_extensions==4.5.0
[pip3] urllib3==1.26.15
[pip3] wcwidth==0.2.6
[pip3] websocket-client==1.5.1
[pip3] wheel==0.38.4
[pip3] wrapt==1.15.0
[pip3] zipp==3.15.0
[conda] #
[conda] # Name Version Build Channel
[conda] _libgcc_mutex 0.1 main defaults
[conda] _openmp_mutex 5.1 1_gnu defaults
[conda] absl-py 1.4.0 pypi_0 pypi
[conda] asttokens 2.2.1 pypi_0 pypi
[conda] backcall 0.2.0 pypi_0 pypi
[conda] ca-certificates 2023.01.10 h06a4308_0 defaults
[conda] certifi 2022.12.7 py38h06a4308_0 defaults
[conda] charset-normalizer 3.1.0 pypi_0 pypi
[conda] cloudpickle 2.2.1 pypi_0 pypi
[conda] comm 0.1.2 pypi_0 pypi
[conda] compiler-gym 0.2.5 pypi_0 pypi
[conda] debugpy 1.6.6 pypi_0 pypi
[conda] decorator 5.1.1 pypi_0 pypi
[conda] deprecated 1.2.13 pypi_0 pypi
[conda] docker 6.0.1 pypi_0 pypi
[conda] executing 1.2.0 pypi_0 pypi
[conda] fasteners 0.18 pypi_0 pypi
[conda] grpcio 1.43.0 pypi_0 pypi
[conda] grpcio-tools 1.43.0 pypi_0 pypi
[conda] gym 0.21.0 pypi_0 pypi
[conda] humanize 4.6.0 pypi_0 pypi
[conda] idna 3.4 pypi_0 pypi
[conda] importlib-metadata 6.1.0 pypi_0 pypi
[conda] ipykernel 6.21.3 pypi_0 pypi
[conda] ipython 8.11.0 pypi_0 pypi
[conda] jedi 0.18.2 pypi_0 pypi
[conda] jupyter-client 8.0.3 pypi_0 pypi
[conda] jupyter-core 5.3.0 pypi_0 pypi
[conda] ld_impl_linux-64 2.38 h1181459_1 defaults
[conda] libffi 3.4.2 h6a678d5_6 defaults
[conda] libgcc-ng 11.2.0 h1234567_1 defaults
[conda] libgomp 11.2.0 h1234567_1 defaults
[conda] libstdcxx-ng 11.2.0 h1234567_1 defaults
[conda] loop-tool-py 0.0.6 pypi_0 pypi
[conda] matplotlib-inline 0.1.6 pypi_0 pypi
[conda] ncurses 6.4 h6a678d5_0 defaults
[conda] nest-asyncio 1.5.6 pypi_0 pypi
[conda] networkx 3.0 pypi_0 pypi
[conda] numpy 1.24.2 pypi_0 pypi
[conda] openssl 1.1.1t h7f8727e_0 defaults
[conda] packaging 23.0 pypi_0 pypi
[conda] parso 0.8.3 pypi_0 pypi
[conda] pexpect 4.8.0 pypi_0 pypi
[conda] pickleshare 0.7.5 pypi_0 pypi
[conda] pip 23.0.1 py38h06a4308_0 defaults
[conda] platformdirs 3.1.1 pypi_0 pypi
[conda] prompt-toolkit 3.0.38 pypi_0 pypi
[conda] protobuf 3.20.3 pypi_0 pypi
[conda] psutil 5.9.4 pypi_0 pypi
[conda] ptyprocess 0.7.0 pypi_0 pypi
[conda] pure-eval 0.2.2 pypi_0 pypi
[conda] pybind11 2.10.4 pypi_0 pypi
[conda] pydantic 1.10.6 pypi_0 pypi
[conda] pygments 2.14.0 pypi_0 pypi
[conda] python 3.8.16 h7a1cb2a_3 defaults
[conda] python-dateutil 2.8.2 pypi_0 pypi
[conda] pyzmq 25.0.1 pypi_0 pypi
[conda] readline 8.2 h5eee18b_0 defaults
[conda] requests 2.28.2 pypi_0 pypi
[conda] setuptools 65.6.3 py38h06a4308_0 defaults
[conda] six 1.16.0 pypi_0 pypi
[conda] sqlite 3.41.1 h5eee18b_0 defaults
[conda] stack-data 0.6.2 pypi_0 pypi
[conda] tabulate 0.9.0 pypi_0 pypi
[conda] tk 8.6.12 h1ccaba5_0 defaults
[conda] tornado 6.2 pypi_0 pypi
[conda] traitlets 5.9.0 pypi_0 pypi
[conda] typing-extensions 4.5.0 pypi_0 pypi
[conda] urllib3 1.26.15 pypi_0 pypi
[conda] wcwidth 0.2.6 pypi_0 pypi
[conda] websocket-client 1.5.1 pypi_0 pypi
[conda] wheel 0.38.4 py38h06a4308_0 defaults
[conda] wrapt 1.15.0 pypi_0 pypi
[conda] xz 5.2.10 h5eee18b_1 defaults
[conda] zipp 3.15.0 pypi_0 pypi

Additional context

I just remember that I use CMAKE_C_COMPILER=gcc & CMAKE_CXX_COMPILER=g++, not clang & clang++ mentioned in the documentation. Is it the key point?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants