You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/02/25 17:32:23 UTC

[GitHub] [tvm] kparzysz-quic opened a new issue #10390: [Bug] fuse_ops takes link_params from executor instead of target

kparzysz-quic opened a new issue #10390:
URL: https://github.com/apache/tvm/issues/10390


   Follow-up to the discussion in [PR8509](https://github.com/apache/tvm/pull/8509).
   
   Resnet50/float32 model crashes during compilation on Hexagon: changes from the PR enable code execution path that leads to an assertion in function `Array<te::Tensor> ScheduleBuilder::VisitExpr_(const ConstantNode* op)` due to not handling scalar constants of type `float16'.  This is a change from the behavior from before this PR.
   
   #### Cause
   The `FuseOps` pass gets the `link_params` flag from the `Executor` attribute from the `IRModule`, instead of taking it from the current target.  If the current target has `link_params=False`, while the executor has `link_params=True`, this will lead to unexpected behavior for the current target.
   
   #### How it happens
   Hexagon target sets `link_params=True`, while CPU target has `link_params=False`.  When compiling a model with mixed-precision (i.e. using `float16`) data, relay optimizations execute pass `FoldConstants`.  This pass runs relay interpreter with a CPU target, regardless of the original compilation target.  During the interpreter execution, `FuseOps` pass is executed.  At this point the current target is CPU, while the `IRModule`'s `Executor` settings correspond to the original "hexagon" target.
   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] kparzysz-quic closed issue #10390: [Bug] fuse_ops takes link_params from executor instead of target

Posted by GitBox <gi...@apache.org>.
kparzysz-quic closed issue #10390:
URL: https://github.com/apache/tvm/issues/10390


   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] u99127 commented on issue #10390: [Bug] fuse_ops takes link_params from executor instead of target

Posted by GitBox <gi...@apache.org>.
u99127 commented on issue #10390:
URL: https://github.com/apache/tvm/issues/10390#issuecomment-1054119845


   The relevant reproducer is here. https://github.com/apache/tvm/pull/8509#issuecomment-1050982328


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] manupa-arm commented on issue #10390: [Bug] fuse_ops takes link_params from executor instead of target

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on issue #10390:
URL: https://github.com/apache/tvm/issues/10390#issuecomment-1051066774


   In the spirit of creating own config in the FoldConstants, could we just add the expected Executor config too ? 
   
   https://github.com/apache/tvm/blob/d9fac4f305c5462de4ab08cd220d60b42c0414f7/src/relay/transforms/fold_constant.cc#L255-L257


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] manupa-arm commented on issue #10390: [Bug] fuse_ops takes link_params from executor instead of target

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on issue #10390:
URL: https://github.com/apache/tvm/issues/10390#issuecomment-1051061424


   Thanks @kparzysz-quic ! this makes more sense!
   
   cc: @d-smirnov @Mousius 
   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] d-smirnov commented on issue #10390: [Bug] fuse_ops takes link_params from executor instead of target

Posted by GitBox <gi...@apache.org>.
d-smirnov commented on issue #10390:
URL: https://github.com/apache/tvm/issues/10390#issuecomment-1058090183


   Fix: https://github.com/apache/tvm/pull/10465


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] kparzysz-quic commented on issue #10390: [Bug] fuse_ops takes link_params from executor instead of target

Posted by GitBox <gi...@apache.org>.
kparzysz-quic commented on issue #10390:
URL: https://github.com/apache/tvm/issues/10390#issuecomment-1064416915


   This fixes the problem.


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] manupa-arm edited a comment on issue #10390: [Bug] fuse_ops takes link_params from executor instead of target

Posted by GitBox <gi...@apache.org>.
manupa-arm edited a comment on issue #10390:
URL: https://github.com/apache/tvm/issues/10390#issuecomment-1051061424


   Thanks @kparzysz-quic ! this makes more sense!
   
   FoldConstants creates its own PassContext (that explains how the override is ignored) and Target but I do wonder why it needs just take the Executor ?
   
   cc: @d-smirnov @Mousius 
   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] kparzysz-quic commented on issue #10390: [Bug] fuse_ops takes link_params from executor instead of target

Posted by GitBox <gi...@apache.org>.
kparzysz-quic commented on issue #10390:
URL: https://github.com/apache/tvm/issues/10390#issuecomment-1051139280


   I think that should work...


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org