Baunsgaard commented on PR #1628: URL: https://github.com/apache/systemds/pull/1628#issuecomment-1150407311
> After a lot of consideration I propose the following: > > 1. Switch... > 2. Add a method to most `SPInstruction`s ... > 3. Some `SPInstruction`s like `ReblockSPInstruction` ... I suggest that you make the methods inside CP and SP instructions part of a interface that allows any instruction to change to FED, and then make the footprint of these functions as small as possible inside each of the CP and SP instructions. All of these instructions should call into the fitting FEDInstructions class that then handle the logic of converting the instructions to FEDInstructions though static constructors that can return null. With this we simply try to call this interface function on the instructions to change them into FEDInstructions when they can before execution. In the static construction it is easy to change the SP instructions (or GPU etc) to CP if possible, otherwise the static constructor would construct SP type. This design addresses all 3 points with (i think) the least amount of code. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
