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/02/24 21:53:21 UTC

[GitHub] [tvm] tqchen opened a new issue #7527: [RFC] TensorIR Scheduling Tracking Issue

tqchen opened a new issue #7527:
URL: https://github.com/apache/tvm/issues/7527


   This is a global tracking issue for landing the initial PRs of TensorIR scheduling. The original RFC can be found [here](https://discuss.tvm.apache.org/t/rfc-tensorir-a-schedulable-ir-for-tvm/7872). Please feel free to bring in more questions to the corresponding thread. 
   
   To make the improvement manageable, we will be breaking the code into several steps. The main architecture scaffolding and 
   data structure changes will come first, then we will upstream individual scheduling primitives in a incremental way, where each component are self-contained.
   
   ## Steps
   
   - [ ] M1a PR0: The additional data structure needed for TensorIR, in particular the Block structure, changes to related fields 
   - [ ] M1a PR1: Changes to the tvmscript parser, printer to allow us to ingest and print the new data structures.
   - [ ] M1a PR2: Overall lowering API to lower a new TIR function to the codegen.
   - [ ] M1b PR0: Initial scaffolding of ScheduleState and Schedule data structure with basic utils and no primitives
   - [ ] M2a PRs: multiple PRs to support scheduling primitives, one PR per primitive, with related test-cases.
   
   
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] manupa-arm edited a comment on issue #7527: [RFC][Tracking Issue] TensorIR Scheduling

Posted by GitBox <gi...@apache.org>.
manupa-arm edited a comment on issue #7527:
URL: https://github.com/apache/tvm/issues/7527#issuecomment-907065910


   Hey @junrushao1994 ,
   
   Thanks for the clarifications.
   
   Since the relay integration is supposed to be happening prior to meta schedule is being concluded, will there be a default 'schedule' (or maybe in the context of TensorIR: default set of scheduling passes) used in a relay.build flow ?


-- 
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 issue #7527: [RFC][Tracking Issue] TensorIR Scheduling

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on issue #7527:
URL: https://github.com/apache/tvm/issues/7527#issuecomment-907200410


   Ack, Many thanks for the info 🙂!


-- 
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] junrushao1994 commented on issue #7527: [RFC][Tracking Issue] TensorIR Scheduling

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on issue #7527:
URL: https://github.com/apache/tvm/issues/7527#issuecomment-907503832


   Hey @manupa-arm, to clarify, Relay integration is probably not happening prior to meta schedule, but along with meta schedule (see M4a of meta schedule timeline). Right now we can use either #7987 or just handwrite TensorIR to play with the scheduling/codegen code path


-- 
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 issue #7527: [RFC][Tracking Issue] TensorIR Scheduling

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on issue #7527:
URL: https://github.com/apache/tvm/issues/7527#issuecomment-906964640


   Hi @junrushao1994 @Hzfengsy ,
   
   Thanks for the effort that goes in here. Some of this scheduling primitives are really useful that are not there in TE.
   
   Will there be a task to integrate these scheduling primitives to be used by main compilation flow? (i.e. relay.build) ?


-- 
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] junrushao1994 commented on issue #7527: [RFC][Tracking Issue] TensorIR Scheduling

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on issue #7527:
URL: https://github.com/apache/tvm/issues/7527#issuecomment-907032840


   Hey @manupa-arm thanks for your interest!
   
   > Will the integration be using #7987 ?
   
   Most of the operators are defined with the TE DSL in TOPI, so in these cases we will definitely use #7987, which converts TE compute dag to TensorIR.
   
   > If you guys have decided, please let us know what other the APIs (at least initially) be used to create the high-level non scheduled Primfunc?
   
   Yep, we introduced a python-based text format (so it's the frontend for TensorIR DSL) as a convenient way to write scehduleable TensorIR. Our unittests contain a lot of examples of these: https://github.com/apache/tvm/blob/main/tests/python/unittest/test_tir_schedule_split_fuse.py#L29-L34.
   
   > Will it include rewriting schedules in TOPI? i.e. decoupling te.compute and scheduling applied to TE graph as passes?
   
   Great question! While #7987 converts TE compute dag to TensorIR, we cannot reuse TOPI's schedule and AutoTVM schedule templates. However, as meta schedule is coming to the rescue, in most of the cases, schedule can be generated automatically with meta schedule. We are designing some APIs to allow customized schedule as well.
   
   Happy to discuss more if you are interested :-)


-- 
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 issue #7527: [RFC][Tracking Issue] TensorIR Scheduling

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on issue #7527:
URL: https://github.com/apache/tvm/issues/7527#issuecomment-909129132


   Thanks @junrushao1994.
   
   


-- 
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] tqchen closed issue #7527: [RFC] TensorIR Scheduling Tracking Issue

Posted by GitBox <gi...@apache.org>.
tqchen closed issue #7527:
URL: https://github.com/apache/tvm/issues/7527


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tqchen commented on issue #7527: [RFC] TensorIR Scheduling Tracking Issue

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #7527:
URL: https://github.com/apache/tvm/issues/7527#issuecomment-798501745


   key data structures are updated as per @jcf94 's comment


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] manupa-arm commented on issue #7527: [RFC][Tracking Issue] TensorIR Scheduling

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on issue #7527:
URL: https://github.com/apache/tvm/issues/7527#issuecomment-909129132


   Thanks @junrushao1994.
   
   


-- 
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 issue #7527: [RFC][Tracking Issue] TensorIR Scheduling

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on issue #7527:
URL: https://github.com/apache/tvm/issues/7527#issuecomment-907065910


   Hey @junrushao1994 ,
   
   Thanks for the clarifications.
   
   Since the relay integration is supposed to be happening prior to meta schedule is being concluded, what would be the default 'schedule' (or maybe in the context of TensorIR: default set of scheduling passes) used in a relay.build flow ?


-- 
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] Hzfengsy commented on issue #7527: [RFC][Tracking Issue] TensorIR Scheduling

Posted by GitBox <gi...@apache.org>.
Hzfengsy commented on issue #7527:
URL: https://github.com/apache/tvm/issues/7527#issuecomment-907176062


   Hey @manupa-arm,
   
   Don't worry. We will make TensorIR be an optional but not the default backend of relay as our first step. There must be many works (including meta schedule and some corner cases that meta schedule can not generate automatically) to do before totally switching TE to TensorIR. 
   
   On the other hand, if you really want to use TensorIR in compilation flow before meta-schedule, you may have to rewrite TOPI schedules you need. Theoretically, we can use both TE and TensorIR in one relay network (i.e., use TensorIR for one special Op but use TE for the rest). Unfortunately, our current implementation does not support it. And we haven't decided if we will support it.


-- 
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] Hzfengsy commented on issue #7527: [RFC][Tracking Issue] TensorIR Scheduling

Posted by GitBox <gi...@apache.org>.
Hzfengsy commented on issue #7527:
URL: https://github.com/apache/tvm/issues/7527#issuecomment-906972044


   Thanks, @manupa-arm. 
   
   Of course, we will! The ultimate goal of TensorIR is to replace the current TE schedule. 
   
   Before integrating it to `relay`, we need to finish all of our M2 items (there are only two left). Here are the following steps:
   - TensorIR docs and tutorial
   - Relay integration
   - Meta Schedule(AutoTIR) https://github.com/apache/tvm/issues/8473


-- 
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 issue #7527: [RFC][Tracking Issue] TensorIR Scheduling

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on issue #7527:
URL: https://github.com/apache/tvm/issues/7527#issuecomment-909129132


   Thanks @junrushao1994.
   
   


-- 
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 issue #7527: [RFC][Tracking Issue] TensorIR Scheduling

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on issue #7527:
URL: https://github.com/apache/tvm/issues/7527#issuecomment-906994980


   Ack. Thanks.
   
   Out of curiosity for the planned relay integration,
   * Will the integration be using #7987 ?
   
   * If you guys have decided, please let us know what other the APIs (at least initially) be used to create the high-level non scheduled Primfunc?
   
   * Will it include rewriting schedules in TOPI? i.e. decoupling te.compute and scheduling applied to TE graph as passes?
   


-- 
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] tqchen commented on issue #7527: [RFC][Tracking Issue] TensorIR Scheduling

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #7527:
URL: https://github.com/apache/tvm/issues/7527#issuecomment-933497843


   All the items are merged as of today. As a result, this issue is closed. Thanks everyone for pushing and landing this major effort.
   


-- 
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] tqchen closed issue #7527: [RFC][Tracking Issue] TensorIR Scheduling

Posted by GitBox <gi...@apache.org>.
tqchen closed issue #7527:
URL: https://github.com/apache/tvm/issues/7527


   


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