torch-mlir icon indicating copy to clipboard operation
torch-mlir copied to clipboard

gitignore generated files and have cmake run the generation instead

Open renxida opened this issue 1 year ago • 1 comments

Currently lib/Dialect/Torch/Transforms/AbstractInterpLibrary.cpp is checked into git, but it's generated by projects/pt1/python/torch_mlir/jit_ir_importer/build_tools/abstract_interp_lib_gen.py.

When projects/pt1/python/torch_mlir/jit_ir_importer/build_tools/abstract_interp_lib_gen.py is edited, the value names like %14 get shifted, and creates a lot of garbage in the commit.

Are there other files like this? Can we make cmake run the generation instead, and add the cpp file to gitignore?

renxida avatar Jan 15 '24 18:01 renxida

This specific file is part of the legacy support for TorchScript, and I'm not sure anyone is maintaining it anymore (by it is still needed for the test suite).

The project builds without a pytorch dep, so we elected to check in the generated files.

stellaraccident avatar Jan 15 '24 18:01 stellaraccident