Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TensorIR][M1b] Schedule class #7847

Merged
merged 1 commit into from
Apr 17, 2021
Merged

[TensorIR][M1b] Schedule class #7847

merged 1 commit into from
Apr 17, 2021

Conversation

junrushao
Copy link
Member

@junrushao junrushao commented Apr 14, 2021

This PR is part of the TensorIR upstreaming effort (#7527) as the last PR of M1b stage, introducing the schedule class interface.

The schedule class is designed as an abstract interface, which allows future extension of implementation.

3 kinds of variables are introduced (Right now all "random" variables are deterministic)

  • Block RV: a random variable that points to a block sref
  • Loop RV: a random variable that points to a loop sref
  • Int RV: a random variable that evaluates to an integer

The user could manipulate (or more formally, schedule) the IR by using via those variables, e.g. split a loop into 2.

src/tir/schedule/concrete_schedule.cc Outdated Show resolved Hide resolved
src/tir/schedule/schedule.cc Show resolved Hide resolved
@yzh119
Copy link
Member

yzh119 commented Apr 14, 2021

Loop RV: a random variable that points to a Block sref
I think it points to a Loop sref?

@junrushao
Copy link
Member Author

@yzh119 Right. Thanks for helping fix the typo :-)

Copy link
Contributor

@jcf94 jcf94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@tqchen tqchen self-assigned this Apr 14, 2021
Copy link
Member

@jroesch jroesch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a bunch of comments on interface/documentation, thanks for the PR!

include/tvm/tir/schedule/schedule.h Outdated Show resolved Hide resolved
include/tvm/tir/schedule/schedule.h Outdated Show resolved Hide resolved
include/tvm/tir/schedule/schedule.h Outdated Show resolved Hide resolved
include/tvm/tir/schedule/schedule.h Outdated Show resolved Hide resolved
include/tvm/tir/schedule/schedule.h Show resolved Hide resolved
include/tvm/tir/schedule/schedule.h Show resolved Hide resolved
include/tvm/tir/schedule/schedule.h Show resolved Hide resolved
include/tvm/tir/schedule/schedule.h Show resolved Hide resolved
python/tvm/tir/schedule/schedule.py Outdated Show resolved Hide resolved
src/tir/schedule/concrete_schedule.cc Outdated Show resolved Hide resolved
@tqchen
Copy link
Member

tqchen commented Apr 16, 2021

@junrushao1994 please fix the lint error

@junrushao
Copy link
Member Author

@tqchen @jroesch @jcf94 @tkonolige @yzh119 Just updated the doc. Would be super helpful if you guys could help proofread :-)

@tqchen
Copy link
Member

tqchen commented Apr 16, 2021

@junrushao1994 there is a warning that needs to be fixed

Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Jared Roesch <roeschinc@gmail.com>
@tqchen tqchen merged commit 2b690ad into apache:main Apr 17, 2021
@junrushao junrushao linked an issue Apr 18, 2021 that may be closed by this pull request
29 tasks
mehrdadh pushed a commit to mehrdadh/tvm that referenced this pull request Apr 22, 2021
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Jared Roesch <roeschinc@gmail.com>
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Jared Roesch <roeschinc@gmail.com>
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Jared Roesch <roeschinc@gmail.com>
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Jared Roesch <roeschinc@gmail.com>
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request May 11, 2021
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Jared Roesch <roeschinc@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC][Tracking Issue] TensorIR Scheduling
6 participants