cornell-zhang / heterocl

HeteroCL: A Multi-Paradigm Programming Infrastructure for Software-Defined Heterogeneous Computing
https://cornell-zhang.github.io/heterocl/
Apache License 2.0
326 stars 92 forks source link

[Python Package] No module named "heterocl.passes" #510

Closed zzzDavid closed 9 months ago

zzzDavid commented 9 months ago

When installing HeteroCL with pip install ., user may face this issue when they try to run tests:

Traceback (most recent call last):
  File "/root/heterocl/tests/test_schedule_compute.py", line 4, in <module>
    import heterocl as hcl
  File "/root/miniconda/envs/hcl-dev/lib/python3.12/site-packages/heterocl/__init__.py", line 5, in <module>
    from .schedule import Schedule, customize, create_schedule
  File "/root/miniconda/envs/hcl-dev/lib/python3.12/site-packages/heterocl/schedule.py", line 27, in <module>
    from .passes.pass_manager import PassManager as ast_pass_manager
ModuleNotFoundError: No module named 'heterocl.passes'

This is caused by a bug in the Python package setup, where passes is excluded in the python_env/lib/python3.12/site-packages/heterocl directory.