Closed and-ivanov closed 2 years ago
Agree, we did something like this for unparse_tasklet
, for example. I would like to specifically mention memlet_copy_to_absolute_strides
(in fact, after using it many times, I still don't really understand what this function does).
I agree. This is a matter of identifying what methods would be suitable for replacing the original one. We can make a list of candidate methods and work on them when there is time.
The difficulty is that this is hard to figure out in advance, and finding time is always a nightmare. Even though we all agree I suspect that unless we have some dedicated slot to do this stuff - something like a once every X months we spend 1-2 evenings on this, I am afraid this will always be pushed back by urgent stuff.
Python google styleguide
Example
https://github.com/spcl/dace/blob/6e91853c0f4fa06ebdd8672e52b478f9b7219873/dace/transformation/dataflow/map_fusion.py#L194
Pros
Possible solution
Split long functions into small functions across the boundaries defined by comments between chunks of block.
Before
After