Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][MLIR][BERT] examples/torchscript_stablehlo_backend_tinybert.py #3148

Open
vasslavich opened this issue Apr 11, 2024 · 0 comments
Open

Comments

@vasslavich
Copy link

vasslavich commented Apr 11, 2024

Hello!
I've built the project on the commit 71d9078.
g++/gcc versions are:

(mlir_venv) user@lnx-user:/mnt/big/devzone/torch-mlir$ g++ --version
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(mlir_venv) user@lnx-user:/mnt/big/devzone/torch-mlir$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Project was built:

$ cmake -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Debug -DPython3_FIND_VIRTUALENV=ONLY -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_EXTERNAL_PROJECTS="torch-mlir" -DLLVM_EXTERNAL_TORCH_MLIR_SOURCE_DIR="$PWD" -DMLIR_ENABLE_BINDINGS_PYTHON=ON  -DLLVM_TARGETS_TO_BUILD=host externals/llvm-project/llvm -DLIBTORCH_SRC_BUILD=ON -DLIBTORCH_VARIANT=shared -DLLVM_ENABLE_ASSERTIONS=ON  -DCMAKE_C_FLAGS_DEBUG="-g -O0" -DCMAKE_CXX_FLAGS_DEBUG="-g -O0"
# Build everything (including LLVM if in-tree)
cmake --build build

I got a segfault for tinybert example:

(mlir_venv) user@lnx-user:/mnt/big/devzone/torch-mlir$ python projects/pt1/examples/torchscript_stablehlo_backend_tinybert.py
/mnt/big/devzone/torch-mlir/mlir_venv/lib/python3.10/site-packages/transformers/utils/hub.py:124: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.
  warnings.warn(
/mnt/big/devzone/torch-mlir/mlir_venv/lib/python3.10/site-packages/transformers/modeling_utils.py:4225: FutureWarning: `_is_quantized_training_enabled` is going to be deprecated in transformers 4.39.0. Please use `model.hf_quantizer.is_trainable` instead
  warnings.warn(
python: /mnt/big/devzone/torch-mlir/externals/llvm-project/mlir/lib/IR/Operation.cpp:624: void checkFoldResultTypes(mlir::Operation*, llvm::SmallVectorImpl<mlir::OpFoldResult>&): Assertion `false && "incorrect fold result type"' failed.
Aborted (core dumped)

================================================================

Maybe does anyone know what the problem is? Could you please share your considerations if so?
Thank you in advance!

@vasslavich vasslavich changed the title core dump: examples/torchscript_stablehlo_backend_tinybert.py [BUG][MLIR][BERT] examples/torchscript_stablehlo_backend_tinybert.py Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant