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 2021/09/30 10:37:06 UTC

[GitHub] [tvm] Leo-arm opened a new pull request #9160: [ETHOSN] Match config for is-supported with compilation target

Leo-arm opened a new pull request #9160:
URL: https://github.com/apache/tvm/pull/9160


   The Ethos-N variant configuration for the is-supported functionality is now
   the same as the variant configuration for the actual compilation
   


-- 
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] Leo-arm commented on a change in pull request #9160: [ETHOSN] Match config for is-supported with compilation target

Posted by GitBox <gi...@apache.org>.
Leo-arm commented on a change in pull request #9160:
URL: https://github.com/apache/tvm/pull/9160#discussion_r720155921



##########
File path: src/relay/backend/contrib/ethosn/codegen.cc
##########
@@ -620,10 +626,10 @@ TVM_REGISTER_GLOBAL("relay.ethos-n.support.conv2d")
       auto err = EthosnAPI::QnnConv2d(call, &params);
       if (params.is_depthwise) {
         *rv = !err &&
-              m_Queries.IsDepthwiseConvolutionSupported(params.bias_info, params.weights_info,
+              m_Queries->IsDepthwiseConvolutionSupported(params.bias_info, params.weights_info,

Review comment:
       It works because only a default variant was supported. Once another variant was selected, there was a mismatch between the variant that is used for the IsSupported functionality and the actual compilation. This patch prepares the way for that.
   I restructured this a little to avoid having to call the setup from elsewhere; it is now a self-contained change.




-- 
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 a change in pull request #9160: [ETHOSN] Match config for is-supported with compilation target

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on a change in pull request #9160:
URL: https://github.com/apache/tvm/pull/9160#discussion_r734327562



##########
File path: src/relay/backend/contrib/ethosn/codegen_ethosn.h
##########
@@ -322,6 +338,8 @@ class EthosnCompiler {
    */
   static std::pair<std::vector<uint32_t>, std::vector<uint32_t>> GetInputOutputOrder(
       NetworkWithIDs network, const std::unique_ptr<sl::CompiledNetwork>& compiled_network);
+
+  static std::unique_ptr<sl::SupportQueries> m_Queries;

Review comment:
       Please add docs.

##########
File path: src/relay/backend/contrib/ethosn/codegen.cc
##########
@@ -606,25 +606,37 @@ std::pair<std::vector<uint32_t>, std::vector<uint32_t>> EthosnCompiler::GetInput
   return std::make_pair(input_order, output_order);
 }
 
-auto ctx = transform::PassContext::Current();
-auto cfg = ctx -> GetConfig<EthosnCompilerConfig>("relay.ext.ethos-n.options").defined()
-               ? ctx -> GetConfig<EthosnCompilerConfig>("relay.ext.ethos-n.options")
-               : AttrsWithDefaultValues<EthosnCompilerConfig>();
-auto m_Queries = sl::SupportQueries(sl::GetFwAndHwCapabilities(
-    sl::EthosNVariantFromString(cfg.value()->variant.c_str()), cfg.value()->sram_size_bytes));
+std::unique_ptr<sl::SupportQueries> EthosnCompiler::m_Queries;

Review comment:
       nit : Do we need this line ?




-- 
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] Leo-arm closed pull request #9160: [ETHOSN] Match config for is-supported with compilation target

Posted by GitBox <gi...@apache.org>.
Leo-arm closed pull request #9160:
URL: https://github.com/apache/tvm/pull/9160


   


-- 
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 pull request #9160: [ETHOSN] Match config for is-supported with compilation target

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on pull request #9160:
URL: https://github.com/apache/tvm/pull/9160#issuecomment-949486187


   This is merged now!. Thanks @Leo-arm.
   


-- 
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] Leo-arm commented on pull request #9160: [ETHOSN] Match config for is-supported with compilation target

Posted by GitBox <gi...@apache.org>.
Leo-arm commented on pull request #9160:
URL: https://github.com/apache/tvm/pull/9160#issuecomment-949438918


   Thanks Manupa. I expect to issue the following PR in the next days and I will take care of the two issues there, if that is OK with you.


-- 
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 merged pull request #9160: [ETHOSN] Match config for is-supported with compilation target

Posted by GitBox <gi...@apache.org>.
manupa-arm merged pull request #9160:
URL: https://github.com/apache/tvm/pull/9160


   


-- 
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 a change in pull request #9160: [ETHOSN] Match config for is-supported with compilation target

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on a change in pull request #9160:
URL: https://github.com/apache/tvm/pull/9160#discussion_r719521619



##########
File path: src/relay/backend/contrib/ethosn/codegen.cc
##########
@@ -620,10 +626,10 @@ TVM_REGISTER_GLOBAL("relay.ethos-n.support.conv2d")
       auto err = EthosnAPI::QnnConv2d(call, &params);
       if (params.is_depthwise) {
         *rv = !err &&
-              m_Queries.IsDepthwiseConvolutionSupported(params.bias_info, params.weights_info,
+              m_Queries->IsDepthwiseConvolutionSupported(params.bias_info, params.weights_info,

Review comment:
       nit : might worth checking whether this is not null to ensure setup is called.




-- 
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