-
Notifications
You must be signed in to change notification settings - Fork 17
[WIP] Introduce benchgc, a benchmark tool for graph compiler #60
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
Conversation
What is this? Why do we introduce yet another graph representation and how it is related to correctness? |
It's not another graph representation. This benchmark tool can accept an .mlir file written in oneDNN graph dialect, and compile & validate it with the pytorch reference. This tool will validate the correctness in the nightly & weekly tests. |
a638a37
to
deff617
Compare
It is, there's a graph definition and all the ops. I also don't see why would we need one for compilation and validation. |
Hi, @kurapov-peter To conduct correctness tests, the testing tool needs to understand the entire graph's topology and the involved operators in order to populate appropriate data and set correct thresholds. Considering that the test cases are in MLIR format, which is quite low-level and challenging to directly discern the topology structure from, we need to translate the MLIR format into the Graph API's JSON format to facilitate the testing tool in making correct behaviors. Considering that complex MLIR files will be exported from the framework side, and that MLIR files lack readability, BenchGC will provide a feature to convert MLIR format into Graph API JSON format. This will facilitate developers in using visualization tools like Neutron to understand the MLIR files and what kind of kernels the framework is actually running. |
Why not use JSON as input in the first place then? |
@kurapov-peter |
You wouldn't be able to use the same flow since something like torch-mlir would not map to the representation you are introducing. This is not an argument in favor of having python graph api. |
@kurapov-peter Using JSON as the input for test cases is unacceptable. Our library is an MLIR library, and the envisioned goal of BenchGC is to verify any MLIR case based on the OneDNN Graph Dialect. If JSON is used as the input and then translated into MLIR format, it would not be able to express all the possibilities that the MLIR format can represent. |
I don't think I follow. You either test PyTorch end-to-end or test a specific optimization/pattern/whatever via MLIR input (or one of the existing representations like onednn graph api or json). Introducing another representation is redundant.
This path is specific to onednn, if we are to target generic cases the proposed python interface should not rely on onednn semantics (which it does now). It should also not be a part of a benchmarking tool. |
@kurapov-peter |
deff617
to
2ea9fd0
Compare
2ea9fd0
to
04b3545
Compare
Why are you adding a benchgc into sources? Why do we need it vendored here and not as a 3rd party dependency? |
new implementation at #161 |
Try to resolve #58
Tasks