[torch-mlir][sparse] inline sparse helper methods (#2918)

Even though the reference compiler is not about performance, inlining
the generated sparse helper methods has a rather big positive impact on
performance, leaving a much better first impression. Therefore, we added
this inlining pass (which leaves all other PyTorch modules unaffected,
since they tend to be one big main() method to start with).

testing:

$./tools/e2e_test.sh --config linalg

Summary:
    Passed: 1164
    Expectedly Failed: 8

$ python -m e2e_testing.main --config=torchdynamo

Summary:
    Passed: 976
    Expectedly Failed: 162
pull/2924/head
Aart Bik 2024-02-16 20:56:42 -08:00 committed by GitHub
parent d65925a8b4
commit 78e10ff09b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -139,6 +139,7 @@ LOWERING_PIPELINE = "builtin.module(" + ",".join([
"sparse-assembler",
"sparsification-and-bufferization",
"sparse-storage-specifier-to-llvm",
"inline", # inline sparse helper methods where useful
# Bufferize.
"func.func(scf-bufferize)",
"func.func(tm-tensor-bufferize)",