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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
