Lunderberg commented on code in PR #11173:
URL: https://github.com/apache/tvm/pull/11173#discussion_r865083846


##########
include/tvm/target/compilation_config.h:
##########
@@ -74,16 +63,37 @@ class CompilationConfigNode : public Object {
   Target host_target;
 
   /*!
-   * \brief Vector of all available \p Targets for compiling primitive 
operators. May contain
-   * a \p Target for the same device type as for the \p host_target, however 
the \p host_target
-   * should be used for all host computations and data. Each \p Target will 
have \p host_target
-   * as its host.
+   * \brief Vector of all available \p Targets for partitioning or compiling 
primitive tensor
+   * operators (kernels). May contain a \p Target for the same device type as 
for the
+   * \p host_target, however the \p host_target should be used for all host 
computations and data.
+   * Each \p Target will have \p host_target as its 'host'.
+   *
+   * It is possible to have multiple primitive targets for the same device 
type. However given

Review Comment:
   Makes sense, and I definitely agree in avoiding magic.  When I read it, it 
seemed more like `IsExternalCodegenFor` was the single source of truth, with 
the sorting of the array being an additional optimization to avoid needing to 
call `IsExternalCodegenFor` in the implementation of 
`FindPrimitiveTargetOrFail`.  From that perspective, it struck me as requiring 
the user to make a change in their arguments in order to allow for that 
optimization.



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

Reply via email to