You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "Lunderberg (via GitHub)" <gi...@apache.org> on 2023/05/30 16:34:20 UTC

[GitHub] [tvm] Lunderberg opened a new pull request, #14985: [Driver] Single-module lowering flow in driver_api.cc

Lunderberg opened a new pull request, #14985:
URL: https://github.com/apache/tvm/pull/14985

   Prior to this commit, a build that used multiple targets needed to provide `tvm::build` with a `Map<Target, IRModule>` specifying which target should be used to compile each `IRModule`.  As a result, lowering passes could not introduce new targets based on a PrimFunc's content (e.g. a `with T.target()` frame to delegate out to another device), nor simplify based on cross-device subroutines (e.g. simplify a host-side conditional based on the known output of a device-side internal subroutine).
   
   This commit makes the `tvm::attr::kTarget` attribute (`"target"`) be the single source of truth for where a `PrimFunc` will be executed. Other existing methods for specifying the target (the `target` parameter for `tvm.build`, the keys in a `Map<Target,IRModule>`, the parameter to the pass `tir::transform::BindTarget`) are still accepted as inputs, and may provide a default value for `tvm::attr::kTarget` if the attribute is missing, but may not overwrite the target attribute.
   
   This is part of a series of commits to simplify the handling of multi-target builds.


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


Re: [PR] [Driver] Single-module lowering flow in driver_api.cc [tvm]

Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on PR #14985:
URL: https://github.com/apache/tvm/pull/14985#issuecomment-2346985176

   The failing unit tests here are blocked by https://github.com/apache/tvm/pull/15757.  The `InlinePrivateFunctions` transform requires all buffers to be declared before use.  However, the `DeclBuffer` nodes are currently stripped out during `FlattenBuffer`, and are no longer available when required after `MakePackedAPI`.


-- 
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] Lunderberg commented on pull request #14985: [Driver] Single-module lowering flow in driver_api.cc

Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on PR #14985:
URL: https://github.com/apache/tvm/pull/14985#issuecomment-1620541528

   @tvm-bot rerun


-- 
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] Lunderberg commented on pull request #14985: [Driver] Single-module lowering flow in driver_api.cc

Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on PR #14985:
URL: https://github.com/apache/tvm/pull/14985#issuecomment-1575160854

   Rebased onto main now that #14944 has landed, marked as ready for review.


-- 
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] Lunderberg commented on pull request #14985: [Driver] Single-module lowering flow in driver_api.cc

Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on PR #14985:
URL: https://github.com/apache/tvm/pull/14985#issuecomment-1578866335

   Converting to draft, as the fixes for the last few CI failures depend on changes in https://github.com/apache/tvm/pull/14986, and so this PR should wait until https://github.com/apache/tvm/pull/14986 has landed.


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


Re: [PR] [Driver] Single-module lowering flow in driver_api.cc [tvm]

Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on PR #14985:
URL: https://github.com/apache/tvm/pull/14985#issuecomment-1875739139

   With https://github.com/apache/tvm/pull/16184 landed, this PR should (hopefully) be able to land without requiring all low-level codegen to directly support function calls.  For codegens that do not yet support function calls, device-side kernels can have subroutines inlined to avoid a recurrence of https://github.com/apache/tvm/pull/16033.
   
   Currently, this PR is rebased on top of main, but does not use of `InlinePrivateFunctions`.  I expect it to fail in CI for Metal codegen, and to have the same ethos-u failure modes as previously.  These should be resolvable by applying `InlinePrivateFunctions`, conditional on the target being used.


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


Re: [PR] [Driver] Single-module lowering flow in driver_api.cc [tvm]

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen closed pull request #14985: [Driver] Single-module lowering flow in driver_api.cc
URL: https://github.com/apache/tvm/pull/14985


-- 
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] tvm-bot commented on pull request #14985: [Driver] Single-module lowering flow in driver_api.cc

Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #14985:
URL: https://github.com/apache/tvm/pull/14985#issuecomment-1568740338

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
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] Lunderberg commented on pull request #14985: [Driver] Single-module lowering flow in driver_api.cc

Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on PR #14985:
URL: https://github.com/apache/tvm/pull/14985#issuecomment-1568742797

   This PR is a subset of the changes introduced in https://github.com/apache/tvm/pull/14862, split out for ease of testing and reviewing.  It is currently a draft PR, as it depends on changes made in https://github.com/apache/tvm/pull/14944, and will be rebased onto main after https://github.com/apache/tvm/pull/14944 lands.


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