mirror of https://github.com/llvm/torch-mlir
3b66b4925a
The ODS-generated code included via the `TorchOps.cpp.inc` file takes a very long time to compile. This PR isolates it into its own file so that the build system can cache it. This PR creates a new file `TorchOpsODSGenerated.cpp` just to include the `TorchOps.cpp.inc` file. Doing so required moving to the "new" way to define verifiers, since the static `verify` free functions in TorchOps.cpp weren't accessible from the .inc file after it was moved to `TorchOpsODSGenerated.cpp`. On my machine, this drops the build time of TorchOps.cpp (such as when iterating on a canonicalizer) from >40 seconds to <10 seconds. 10 seconds still isn't great though, but at least it isn't "go get a coffee" type of waiting. |
||
---|---|---|
.. | ||
torch-mlir | ||
torch-mlir-c | ||
CMakeLists.txt |