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

dump-consts.py doesn't work anymore #8367

Closed
tt-dma opened this issue May 10, 2024 · 4 comments
Closed

dump-consts.py doesn't work anymore #8367

tt-dma opened this issue May 10, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@tt-dma
Copy link
Contributor

tt-dma commented May 10, 2024

It's referenced in the debugging tips in CONTRIBUTING.md: https://github.com/tenstorrent/tt-metal/blob/main/CONTRIBUTING.md#debugging-tips

(python_env) davidma@e04cs04:~/tt-metal$ python tt_metal/tools/dump-consts.py built/0/kernels/cq_dispatch/12552114973568162682/ncrisc/ncrisc.elf --function kernel_main
Traceback (most recent call last):
  File "tt_metal/tools/dump-consts.py", line 20, in <module>
    from docopt import docopt
ModuleNotFoundError: No module named 'docopt'

When I manually install:

(python_env) davidma@e04cs04:~/tt-metal$ python tt_metal/tools/dump-consts.py built/0/kernels/cq_dispatch/12552114973568162682/ncrisc/ncrisc.elf --function kernel_main
ELF file has no DWARF info.
@tt-dma tt-dma added the bug Something isn't working label May 10, 2024
@ihamer-tt ihamer-tt self-assigned this May 11, 2024
@ihamer-tt
Copy link
Contributor

ihamer-tt commented May 11, 2024

docopt is a dependency (to parse the command line arguments): pip install docopt.

DWARF information is required for dump-consts. It gets added to the ELF files when -g complier flag is present. The flag was removed in 1837b1f. We should:

  • add an env var to add the flag back in -g (TT_METAL_RISCV_DEBUG_INFO)
  • improve the message shown by dump-consts.py
  • add the above to the documentation

@tt-dma
Copy link
Contributor Author

tt-dma commented May 14, 2024

Should we add docopt to our python installation?

@ihamer-tt
Copy link
Contributor

ihamer-tt commented May 15, 2024

Yes. The last commit is to add it to requirements-dev.txt @tt-dma, let me know if you were thinking of some other env as well.

@tt-dma
Copy link
Contributor Author

tt-dma commented May 15, 2024

: Add docopt to dev-requirements

Yeah that's the one, thanks!

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