torch-mlir/build_tools
Sean Silva 729402c3f4 Reduce compilation time for TorchOps.cpp.inc
The `assemblyFormat` stuff (which generates unrolled, per-op C++ code)
was taking up a lot of compile time, and all the ops are essentially
printed with the same logic. So this PR makes them all call the same
helper function. This is done by using
`let hasCustomAssemblyFormat = 1` and then implementing `FooOp::parse`
and `FooOp::print`.

Additionally, the `Generated*Ops.td` files are all collapsed into just
`GeneratedTorchOps.td` (there is no reason to have the files separate,
since the files are very large anyway so one is always having to search
within them -- editors don't care that the file to search is now a bit
bigger :) ).

This reduces TorchOpsODSGenerated.cpp compile time (which is now
GeneratedTorchOps.cpp) from 39 to 31 seconds on my machine. This is
actually less than I expected, but this PR is an overall cleanup to the
code anyway. The next step will be to introduce (better) functionality
upstream for sharding the TorchOps.cpp.inc file, so that we can truly
parallelize the O(#ops) costs. This is also necessary, because after
this PR, TorchDialect.cpp is now the slowest file to compile, due to the
`addOperations<... all the ops ...>` call, which needs to be shareded
too.
2022-03-21 14:42:26 -07:00
..
torchscript_e2e_heavydep_tests Remove basic_mt from the heavydep tests 2022-03-15 15:25:53 -07:00
build_python_wheels.sh Add torch_mlir snapshot packages. 2021-10-06 14:50:31 -07:00
build_standalone.sh Cmake build commands fix. 2022-02-16 20:46:53 +05:30
update_shape_lib.sh Introduce new shape library design. 2022-03-15 12:41:58 -07:00
update_torch_ods.sh Reduce compilation time for TorchOps.cpp.inc 2022-03-21 14:42:26 -07:00
write_env_file.sh Move external/torch-mlir to the root of the repo. 2021-09-27 17:11:08 -07:00