krishnaraj36 commented on code in PR #13450:
URL: https://github.com/apache/tvm/pull/13450#discussion_r1064834394
##########
src/relay/collage/gather_partition_specs.cc:
##########
@@ -103,6 +101,38 @@ BYOCStyle BYOCFusionStyleForCompiler(const String&
compiler) {
}
}
+/*!
+ * \brief Returns the fusion style for /p compiler.
+ */
+BYOCStyle BYOCFusionStyleForCompiler(const String& compiler) {
+ tvm::transform::PassContext ctxt = tvm::transform::PassContext::Current();
+ std::string config_key = "relay.collage.byoc_fusion_style";
+ std::string compiler_id = compiler;
+ Optional<Array<String>> byoc_configs = ctxt->GetConfig(config_key,
Optional<Array<String>>());
+ if (!byoc_configs.defined()) {
+ return DefaultBYOCFusionStyleForCompiler(compiler);
+ }
+ BYOCStyle byoc_fusion_style = kNoFusionBYOCStyle;
+ for (auto config_ : byoc_configs.value()) {
+ std::string byoc_str = static_cast<std::string>(config_);
+ std::string byoc_compiler = byoc_str.substr(0, byoc_str.find(".", 0));
+ if (byoc_compiler == compiler) {
+ std::string fusion_name = byoc_str.substr(byoc_str.find(".", 0) + 1,
byoc_str.size());
Review Comment:
Regarding compiler name prefix in fusion style config, since collage can
support multiple compiler target, to define each byoc compiler target fusion
style, we have defined such that
e.g. In case of NVidia target -
byoc_fusion_style = [cutlass.NoFusion, cudnn.NoFusion, tensorrt.TVMFusion]
So, we have uniformly defined to support all such combinations.
--
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]