maheshambule edited a comment on pull request #5528: URL: https://github.com/apache/incubator-tvm/pull/5528#issuecomment-624809315
Thanks for the response. > Few more points to consider: Let me clarify, the points which I mentioned are not for in or against both the approaches (table vs decorator). They were for general discussion. I think as far as code deduplication is considered both the approaches are fine. Both can achieve the same. The difference comes with the look and feel of it. And hence it is subjective and can be driven by personal choices. However, still, let me put a few pros of a decorator approach. - Since it is more pythonic, new developers could easily relate to it. - The decorator places all the attributes/properties of a particular op in a single view. For table based approach these are divided into two places - at table level and in the convert function. - The decorator intuitively lets you add pre and post-processing. For. ex. fusing activation functions to the output. Let me know your thoughts. > That seems to be equivalent to -1 in the other scheme Ok. Need to decide -1 or None. > My hunch is that we should be able to get to a single decorator for this sample set above falls out but I'd like to see what you think. Without working it out I think a single decorator will suffice. > What would the relay expressions represent ? There is a common pattern where we convert TFLite tensor expression to Relay expression often using self.get_expr. Should we push back this conversion to a common code? Also a more generic implementation of conversion is added in this PR as get_tensor_expr function https://github.com/apache/incubator-tvm/pull/5528/files#diff-ee9a43edfb6fd0c9121e00c67c59ef43R2414. > I'm not sure I follow this one. I was thinking if we could somehow find some common code that will be a wrapper to code like below. But on the second though, I think it is not worth the effort. https://github.com/apache/incubator-tvm/blob/e2bd43b6f728d4d0ca2659dcf73da74294655133/python/tvm/relay/frontend/tflite.py#L633-L641 ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org