torch-mlir/build_tools
Jae Hoon (Antonio) Kim d9aee0d7a7 E2E HuggingFace Bert using LTC Backend (#912)
* Update native function definitions

* Add ops to support bert lowering

- Add empty_strided and as_strided

- Restore zeros_like to op blacklist (Without this, tensors will be unintentionally created with a CPU device rather than lazy)

- Check for composite implicit ops and add device data IR

- Also fix codegen for functionalization

* Add autogen to CMakeList

* Remove PyTorch submodule

* Reduced BERT model size

* Print Mark Step status in Torch MLIR LTC debug string

* Apply fixes to work with latest upstream/main

- Pass importOptions into getMlirTypeFromTorchType during NodeImporter::importNode

  Without this, the tensor type created may have a mismatched type as ImportOptions may cause vtensor to be used instead of tensor

* Update shape inference functions

- Fixed compute_shape_native_batch_norm when mean and var are uninitialized

  Previously, the number of shapes returned would be <3 if either mean or val was didn't exist. Instead, we now initialize them with a vector matching the number of channels.

- Implemented compute_shape_mul

- Fixed bug in reshape shape inference error message

* Get MLIR backend more consistent with TS backend

- Remove LazyNativeFunctions::_unsafe_view from autogen

- Blacklist ops to make JIT graph more like output of TS backend

- Print graph when SSA value has mismatch of types and results

- Remove normalize_index from LazyShapeInference

- Fix seeds for LTC example models

* Update and clean up shape inference functions

- Prune shape inference functions

- Add shape inference function for GenerateSlice

- Add shape inference function for GenerateCopy

Co-authored-by: Henry Tu <henry.tu@cerebras.net>
2022-07-30 09:40:02 -04:00
..
python_deploy Revert to using Pytorch paths for delocate (#1065) 2022-07-15 19:51:59 -07:00
torchscript_e2e_heavydep_tests build: improve robustness of cmake and shell scripts (#1018) 2022-07-06 14:39:30 -07:00
autogen_ltc_backend.py E2E HuggingFace Bert using LTC Backend (#912) 2022-07-30 09:40:02 -04:00
autogen_ltc_backend.yaml E2E HuggingFace Bert using LTC Backend (#912) 2022-07-30 09:40:02 -04:00
build_libtorch.sh Add linux and macOS source builds in CI (#1070) 2022-07-21 14:16:03 -07:00
build_python_wheels.sh build: improve robustness of cmake and shell scripts (#1018) 2022-07-06 14:39:30 -07:00
build_standalone.sh build: improve robustness of cmake and shell scripts (#1018) 2022-07-06 14:39:30 -07:00
update_shape_lib.sh build: improve robustness of cmake and shell scripts (#1018) 2022-07-06 14:39:30 -07:00
update_torch_ods.sh build: improve robustness of cmake and shell scripts (#1018) 2022-07-06 14:39:30 -07:00
write_env_file.sh build: improve robustness of cmake and shell scripts (#1018) 2022-07-06 14:39:30 -07:00