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
[Relax][Pass] Split CallTIR By Pattern #83
[Relax][Pass] Split CallTIR By Pattern #83
Conversation
05b380b
to
3bd6c45
Compare
The pass depends on op legalizer |
1fc57ba
to
3537fff
Compare
5841381
to
9040c89
Compare
@spectrometerHBH @tqchen The split calltir pass and cutlass support is finished except pattern matching for convolution. It would be great if you can review it. Please ignore the op legalizer cherry-picked from Ruihang's branch. I will rebase it after legalizer is merged. |
A_tvm = tvm.nd.array(A, dev) | ||
B_tvm = tvm.nd.array(B, dev) | ||
executable = tvm.runtime.load_module(filename) | ||
result = f_run(executable, dev, A_tvm, B_tvm) |
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.
use before /expected tests ideally instead of execution test. exection test should go to a separate place under test_integration_trasnform_cutlass_codegen.py
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 can't think of a way to add before/expected tests because after applying the pass there will be extern funcs, and extern funcs cannot be parsed
bc66e21
to
eefd6d2
Compare
@tqchen @spectrometerHBH The new version of tir matching and library codegen has been done. |
TVM_DEFINE_OBJECT_REF_METHODS(MatchResult, ObjectRef, MatchResultNode) | ||
}; | ||
|
||
using FCodegen = runtime::TypedPackedFunc<Array<ObjectRef>(Array<MatchResult> match_results)>; |
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.
Codegen signature in principle is not part of tir pattern. Try to define it in other places.
This PR implements the library dispatcher for Relax, which currently uses CUTLASS as one library. It introduces the TIR-level pattern registration and matching algorithm. It introduces a Relax pass to split out subgraphs that match the patterns of backends.
This PR implements the library dispatcher for Relax, which currently uses CUTLASS as one library. It introduces the TIR-level pattern registration and matching algorithm. It introduces a Relax pass to split out subgraphs that match the patterns of backends.
This PR implements the library dispatcher for Relax, which currently uses CUTLASS as one library. It introduces the TIR-level pattern registration and matching algorithm. It introduces a Relax pass to split out subgraphs that match the patterns of backends.
This PR implements the library dispatcher for Relax, which currently uses CUTLASS as one library. It introduces the TIR-level pattern registration and matching algorithm. It introduces a Relax pass to split out subgraphs that match the patterns of backends.
WIP