Xilinx / Xilinx/finn

Enable log to stdout/stderr for dataflow builder, to enable PDB debugging

Open
#289 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.1k
Forks
308
Avg merge
3d 9h
Merged PRs (30d)
14

Description

When debugging new FINN code it's helpful to get a debugger console and walk through the code. ATM the dataflow builder prevents this by redirecting debugger output to the log.

I was able to circumvent this by commenting out lines 108/109 and assigning the stdout and stderr loggers to sys.stdout and sys.stderr.

https://github.com/Xilinx/finn/blob/0fc686e9d0ed826046da7ab38f339148ea340afa/src/finn/builder/build_dataflow.py#L108

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/finn/builder/build_dataflow.py around lines 108-109, where stdout and stderr are redirected to the log. Check how this affects debugger output, then make the builder allow log output through stdout/stderr so PDB debugging can be used. Done means the dataflow builder no longer prevents a debugger console from receiving output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.