Option to exclude nodes from transformation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 308
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 14
Description
Sometimes it's necessary to iterate over a design multiple times by changing some parameters to observe how the behavior changes. To speed up the dev process for these use cases, it'd be beneficial to have the possibility of filtering out certain nodes prior to applying transformations.
One example of this is the setting of minimal FIFO sizes to get full throughput: we would create a stitched IP design with some initial FIFO sizes, run a throughput test in rtlsim, modify the FIFO sizes based on observations and do it again. In this case, everything but the FIFO nodes can be excluded from code generation transformation since they would remain the same.
In terms of how this could be implemented:
- the
NodeLocalTransformationprovides an almost-natural way of doing this -- we could add an additionalfilter_fxnargument (default valueNone) that takes in a function examining a single node and returning True/False to indicate whether that node should be kept. Internally, the base class impl can be modified to runfilteron the nodes with this function prior to calling parallelmap. - the general
Transformationis a bit harder but we could use the same interface and leave it up to each transformation to respect it.
This would also provide a solution to #92 -- not exactly the same thing, but one could restrict the filter to operate on one or a few nodes per call.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the NodeLocalTransformation base implementation, especially where nodes are passed to parallel map, then compare how the general Transformation interface is implemented. Trace the existing transformation entry points and determine how a node filter could be applied consistently; done means the proposed filtering behavior is defined for both transformation types without changing nodes that are excluded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100