Explicit pointwise Conv1D implementation for "Latency" strategy
Description
This is mostly for discussion and to let others test it out like @Duchstf. This PR adds an explicit pointwise Conv1D implementation, where the reuse factor (RF
) is used to split the layer execution and reuse the existing module RF
times
Original pointwise Conv1D:
(in_width, n_chan) -> (in_width, n_filt)
This PR splits it into RF
calls of
(in_width/RF, n_chan) -> (in_width/RF, n_filt)
(in_width/RF, n_chan) -> (in_width/RF, n_filt)
(in_width/RF, n_chan) -> (in_width/RF, n_filt)
- ...
The II ~ RF. To turn it on you have to configure ConvImplementation
of the layer named <layer>
config["LayerName"]["<layer>"]["ConvImplementation"] = "Pointwise"
Limitations:
- Assumes
in_width
is divisible byRF
- Hardcoded explicit execution up to
RF = 120
. Could be automated with code generation.
Type of change
-
New feature (non-breaking change which adds functionality) -
A new research paper code implementation
Tests
See test/pytest/test_pointwiseconv.py
Checklist
-
I have read the guidelines for contributing. -
I have commented my code, particularly in hard-to-understand areas. -
I have made corresponding changes to the documentation. -
My changes generate no new warnings. -
I have installed and run pre-commit
on the files I edited or added. -
I have added tests that prove my fix is effective or that my feature works.