Join GitHub today
[optimization] Perform vertical FC weights split optimization. #3481
Backends could invoke this pass as part of the backend specific optimizations.
[Optional Fixes #issue]
changed the title
**WIP** [optimization] Perform vertical FC weights split optimization.
Sep 4, 2019
I like this PR, but I think that we can improve things with management of complexity (considering support for multiple targetts). Let's split this PR into two sections: the policy and mechanism. Consider having a function that's called 'splitFCs' that accepts some parameters like numOfChunks and minKToSplit instead of the constants. Now you can call this function splitFCs(12, 800) from the code.
The next step would be, how do you decide on the parameters and how you manage the constants for the different backends. I suggest making this a target-specific transformation. The target should decide on the parameters to pass to the transformation function, which needs to be globally accessible in the optimizer.
That all makes sense and provides better flexibility.
We briefly talked about this in person I agree with this.
I'll address comments today/tomorrow.
jfix71 left a comment
LGTM, few nits. Nice work!
RE: the small vector/standard array/vector thing, I think you should be able to use