-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[MetaSchedule][M3b] Database #9061
Conversation
Will try to find time reviewing this PR this afternoon or tomorrow. |
Took a fast pass and had an offline discussion with @junrushao1994. Two major points:
|
Per discussion with @comaniac. The naming change:
Minor change in the code structure:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First kind of stream of consciousness pass through the code. Mostly documentation/comment requests. It seems the direct use of the Database is all wrapped in a JSON-related file object, which kind of confuses me, would you mind providing a brief explanation of the class structure somewhere?
Hey thanks @mbrookhart for asking! Let's focus on the database API and ignore the workload registry part (which will be removed according to previous discussion with Cody in this thread).
|
The first three points and the last one make sense, but I think I'm a little confused by |
@mbrookhart Yeah indeed |
@mbrookhart @comaniac I updated the patch according to your comments. Major changes:
Let me know what you guys think :-) |
BTW, here is the convention we are using in TensorIR and meta schedule project:
class Database : ... {
public:
static Database JSONFile(...); // TBD: Rename
static Database SQLiteDB(...);
}; And then another problem here is what name should we change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The refactored version is much cleaner :D
Left some comments mostly regarding to the naming. Otherwise LGTM.
This PR is part of the meta schedule project (#8473) that adds a generic Database interface of tuning records, as well as a default implementation of using two JSON-files to mimic the database. This feature is future-compatible with dynamic shape auto-tuning. Co-authored-by: Xiyou Zhou <xiyou@octoml.ai> 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: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I agree with @comaniac here, definitely much cleaner now, and I think the only thing I'm still concerned about is naming. Maybe we could just call it JSONDatabase
? I think that's a little less ambiguous but still succinct.
Otherwise, LGTM
Hey thanks guys for the discussion! Let's go with the name |
PR updated according to our discussion 👍 @mbrookhart @comaniac please take another look. Thanks guys for the discussion! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Junru!
Thanks everybody for the review :-) |
* main: (37 commits) [ONNX] [Relay] Dynamic squeeze (apache#9095) [Meta Schedule][M3b] Database (apache#9061) [Bugfix] Add nullptr checking for `AttrStmt` with `coproc_uop_scope` attr key (apache#9123) [Codegen] Swap out analyzer when outlining (apache#9117) [CI] bash.sh, build.sh: add option to set the container name and hostname (apache#9110) Ensure google-mock is installed and setup (apache#9107) Arm(R) Ethos(TM)-U NPU TIR to CS for Conv2D (apache#8811) Frontend: add onnx GlobalLpPool op (apache#8845) [LLVM] Refactor MakeCallPacked, NFC (apache#9118) prevent casting handle to other types (apache#9114) fix annotation of tir generic (apache#9119) [Relay] Register layout conversion function to more reduce ops (apache#9048) Fix the missing `dtype` attribute of `tir.Shuffle` in Python level (apache#9131) add `multiply` and remove `subtract` for dnnl json runtime (apache#9120) relu of dnnl json runtime only support 4-dims input (apache#9122) [Meta Schedule][M3a] SpaceGenerator (apache#9079) [TensorIR][Bugfix] Disallow fusing loops with dependency (apache#9112) adding Jorn to reviewers list (apache#9105) [BYOC] Fix incorrect conv2d padding handling of `dnnl with c source runtime` (apache#9097) [Frontend][TFLite] fix apache#9078 (apache#9099) ...
This PR is part of the meta schedule project (apache#8473) that adds a generic Database interface of tuning records, as well as a default implementation of using two JSON-files to mimic the database. This feature is future-compatible with dynamic shape auto-tuning. Co-authored-by: Xiyou Zhou <xiyou@octoml.ai> 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: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
This PR is part of the meta schedule project (apache#8473) that adds a generic Database interface of tuning records, as well as a default implementation of using two JSON-files to mimic the database. This feature is future-compatible with dynamic shape auto-tuning. Co-authored-by: Xiyou Zhou <xiyou@octoml.ai> 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: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
This PR is part of the meta schedule project (#8473) that adds a workload registry, as well as
a generic database of tuning records. This feature is future-compatible with dynamic shape
auto-tuning work by @ZihengJiang and @ArmageddonKnight.
Depend on PR #9059.The PR is ready for review now!Co-authored-by: Xiyou Zhou <xiyou@octoml.ai>
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: Siyuan Feng <Hzfengsy@sjtu.edu.cn>