rapidstream-org / rapidstream-tapa

RapidStream TAPA compiles task-parallel HLS program into high-frequency FPGA accelerators.
https://tapa.rtfd.io
MIT License
155 stars 32 forks source link

TAPA breaks SODA due to import issues #86

Closed Blaok closed 2 years ago

Blaok commented 2 years ago

https://github.com/UCLA-VAST/soda/runs/6300693249?check_suite_focus=true

ImportError: Failed to import test module: tests.test_core
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/unittest/loader.py", line [37](https://github.com/UCLA-VAST/soda/runs/6300693249?check_suite_focus=true#step:5:37)7, in _get_module_from_name
    __import__(name)
  File "/runner/_work/soda/soda/src/tests/test_core.py", line 8, in <module>
    from soda import core
  File "/runner/_work/soda/soda/src/soda/core.py", line 16, in <module>
    from soda.optimization import cluster
  File "/runner/_work/soda/soda/src/soda/optimization/cluster.py", line 11, in <module>
    from tapa import tapac
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/tapa/tapac.py", line 17, in <module>
    import tapa.core
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/tapa/core.py", line 31, in <module>
    from .codegen.axi_pipeline import get_axi_pipeline_wrapper
ModuleNotFoundError: No module named 'tapa.codegen'

I was able to reproduce this issue by installing TAPA from PyPI. We should avoid relative imports in general to avoid this kind of issues.

Blaok commented 2 years ago

Fixed by 00f9ea5c9a7b80a0f406add3555ef1f7783a6e53