kumasento commented on issue #4847: Return empty CSourceModule when no lowered_funcs exists in Relay mod URL: https://github.com/apache/incubator-tvm/pull/4847#issuecomment-585438528 Hi @mbarrett97 Sorry I have got some questions for the case you've mentioned. 1. As you suggested, the assertion for `lowered_funcs.size()` in the branch assuming that external modules exist should be raised in the current implementation, but what is the expected behaviour when we actually use `CSourceModule` with an empty string? Should we simply remove this assertion since `ret_.mod` exists anyway and won't affect external module importing? 2. This line of code: https://github.com/apache/incubator-tvm/blob/a5661611472c8e92b20bbe4d074333b8183f2878/src/target/source/source_module.cc#L101 is located in a `SaveToFile` function, which is not called frequently, and the single use case I've noticed: https://github.com/apache/incubator-tvm/blob/fc1a1d83691f7229e25a37befdcd3ad9c3d430b3/tests/cpp/utvm_runtime_standalone_test.cc#L100 only exists in test and doesn't trigger that assertsion since `fmt` is `"o"`. Even if `fmt` is `"cc"`, assuming no such assertion and the string is empty, there should not be any exception caused (at the code level, I'm not sure whether functionally it is expected). So do you think we could simply remove that empty string checker? Thanks!
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
