Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add shapelib and Torch ODS gen tests
Also update the scripts to return 1 when there are changes. The tests can check and report if there are any changes. TEST: The passing tests look like: :::: Run shapelib update tests Shape Lib is up to date :::: Run torch_ods update tests Torch ODS is up to date Failing would like like: anush@sdp ~/github/torch-mlir % time ./build_tools/update_shape_lib.sh PYTHONPATH=/home/anush/github/torch-mlir/build/tools/torch-mlir/python_packages/torch_mlir python -m torch_mlir.dialects.torch.importer.jit_ir.build_tools.shape_lib_gen --pytorch_op_extensions= --torch_transforms_cpp_dir=/home/anush/github/torch-mlir/lib/Dialect/Torch /Transforms Generated files are not up to date (see diff below) >>> Please run ./build_tools/update_torch_ods.sh and ./build_tools/update_shape_lib.sh <<< diff --git a/lib/Dialect/Torch/Transforms/ShapeLibrary.cpp b/lib/Dialect/Torch/Transforms/ShapeLibrary.cpp index f7a8f69c..a780ee33 100644 --- a/lib/Dialect/Torch/Transforms/ShapeLibrary.cpp +++ b/lib/Dialect/Torch/Transforms/ShapeLibrary.cpp @@ -14,6 +14,8 @ #include "torch-mlir/Dialect/Torch/Transforms/Passes.h" +foo + using namespace mlir; StringRef mlir::torch::Torch::getShapeLibrary() { ./build_tools/update_shape_lib.sh 0.02s user 0.01s system 104% cpu 0.035 total
- Loading branch information