t-vi commented on pull request #6472: URL: https://github.com/apache/incubator-tvm/pull/6472#issuecomment-692483313
Note that maskrcnn-benchmark isn't necessarily intended to be scripted, the worthwhile things have been incorporated into torchvision and improved there. The trouble with in-place operators is that their semantics are not functional (i.e. they modify their inputs) and thus cannot be mapped to TVM. For example that when operated on views (e.g. slices of a tensor, things that come from `view`), they will change the origin (`a[2:4] = b` is a slice + a tensor modifying a). What you would need to do is to preprocess the graph to remove these side-effects - for example if you can exclude that the input to `clamp_` is a view (e.g. because it comes out of a convolution) and that it is not used anywhere else, you can replace it with `clamp` and proceed. It does require having an opinion on which tensors might share memory (the alias analysis in the PyTorch JIT does that). The last discussion we had on this was #6049 . ---------------------------------------------------------------- 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]
