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

Crash while running Concrete ML #66725

Closed
marcelocirilo opened this issue Sep 19, 2023 · 4 comments
Closed

Crash while running Concrete ML #66725

marcelocirilo opened this issue Sep 19, 2023 · 4 comments
Labels
crash Prefer [crash-on-valid] or [crash-on-invalid] mlir

Comments

@marcelocirilo
Copy link

marcelocirilo commented Sep 19, 2023

I tried this code:

from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
from concrete.ml.sklearn import LogisticRegression

# Lets create a synthetic data-set
x, y = make_classification(n_samples=100, class_sep=2, n_features=30, random_state=42)

# Split the data-set into a train and test set
X_train, X_test, y_train, y_test = train_test_split(
    x, y, test_size=0.2, random_state=42
)

# Now we train in the clear and quantize the weights
model = LogisticRegression(n_bits=8)
model.fit(X_train, y_train)

# We can simulate the predictions in the clear
y_pred_clear = model.predict(X_test)

# We then compile on a representative set 
model.compile(X_train)

# Finally we run the inference on encrypted inputs !
y_pred_fhe = model.predict(X_test, fhe="execute")

print("In clear  :", y_pred_clear)
print("In FHE    :", y_pred_fhe)
print(f"Similarity: {int((y_pred_fhe == y_pred_clear).mean()*100)}%")

# Output:
    # In clear  : [0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 1 1 1 0 0]
    # In FHE    : [0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 1 1 1 0 0]
    # Similarity: 100%

but I got this?

 #0 0x00007f0d6bae5b91 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x13b4b91)
 #1 0x00007f0d6bae35a4 SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f0dfb372520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x00007f0d6fecc652 concrete_optimizer::dag::unparametrized::OperationDag::new::h9a051e100108e97d (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x579b652)
 #4 0x00007f0d6fec56aa cxx::unwind::prevent_unwind::hb298ae28e065ccf9 (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x57946aa)
 #5 0x00007f0d6fec19da concrete_optimizer::dag::empty() (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x57909da)
 #6 0x00007f0d6f17d378 mlir::concretelang::optimizer::(anonymous namespace)::FunctionToDag::build() ConcreteOptimizer.cpp:0:0
 #7 0x00007f0d6f17f718 mlir::concretelang::optimizer::DagPass::runOnOperation() (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x4a4e718)
 #8 0x00007f0d6ba1f452 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x12ee452)
 #9 0x00007f0d6ba1fa29 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x12eea29)
#10 0x00007f0d6ba20a33 mlir::detail::OpToOpPassAdaptor::runOnOperationImpl(bool) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x12efa33)
#11 0x00007f0d6ba1f146 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x12ee146)
#12 0x00007f0d6ba1fa29 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x12eea29)
#13 0x00007f0d6ba20531 mlir::PassManager::run(mlir::Operation*) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x12ef531)
#14 0x00007f0d6d73316b mlir::concretelang::pipeline::getFHEContextFromFHE[abi:cxx11](mlir::MLIRContext&, mlir::ModuleOp&, mlir::concretelang::optimizer::Config, std::function<bool (mlir::Pass*)>) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x300216b)
#15 0x00007f0d6d70c1b0 mlir::concretelang::CompilerEngine::getConcreteOptimizerDescription(mlir::concretelang::CompilerEngine::CompilationResult&) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x2fdb1b0)
#16 0x00007f0d6d70c8dd mlir::concretelang::CompilerEngine::determineFHEParameters(mlir::concretelang::CompilerEngine::CompilationResult&) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x2fdb8dd)
#17 0x00007f0d6d70f9d6 mlir::concretelang::CompilerEngine::compile(llvm::SourceMgr&, mlir::concretelang::CompilerEngine::Target, std::optional<std::shared_ptr<mlir::concretelang::CompilerEngine::Library> >) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x2fde9d6)
#18 0x00007f0d6d7150ac mlir::concretelang::CompilerEngine::compile(llvm::SourceMgr&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, bool, bool, bool, bool) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x2fe40ac)
#19 0x00007f0d6b8b784c mlir::concretelang::LibrarySupport::compile(llvm::SourceMgr&, mlir::concretelang::CompilationOptions) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x118684c)
#20 0x00007f0d6b8ba01a library_compile(LibrarySupport_Py, char const*, mlir::concretelang::CompilationOptions) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x118901a)
#21 0x00007f0deb4cfadc (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/_concretelang.cpython-310-x86_64-linux-gnu.so+0x5cadc)
#22 0x00007f0deb4afb4d (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/_concretelang.cpython-310-x86_64-linux-gnu.so+0x3cb4d)
#23 0x00007f0deb496177 (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/_concretelang.cpython-310-x86_64-linux-gnu.so+0x23177)
#24 0x000055c967ffae0e (/usr/bin/python3.10+0x15fe0e)
#25 0x000055c967ff15eb _PyObject_MakeTpCall (/usr/bin/python3.10+0x1565eb)
#26 0x000055c9680097bb (/usr/bin/python3.10+0x16e7bb)
#27 0x000055c967fe98a2 _PyEval_EvalFrameDefault (/usr/bin/python3.10+0x14e8a2)
#28 0x000055c967ffb70c _PyFunction_Vectorcall (/usr/bin/python3.10+0x16070c)
#29 0x000055c967fe3f52 _PyEval_EvalFrameDefault (/usr/bin/python3.10+0x148f52)
#30 0x000055c967ffb70c _PyFunction_Vectorcall (/usr/bin/python3.10+0x16070c)
#31 0x000055c967fe98a2 _PyEval_EvalFrameDefault (/usr/bin/python3.10+0x14e8a2)
#32 0x000055c967ffb70c _PyFunction_Vectorcall (/usr/bin/python3.10+0x16070c)
#33 0x000055c967fe3f52 _PyEval_EvalFrameDefault (/usr/bin/python3.10+0x148f52)
#34 0x000055c967ff0784 _PyObject_FastCallDictTstate (/usr/bin/python3.10+0x155784)
#35 0x000055c968005744 (/usr/bin/python3.10+0x16a744)
#36 0x000055c967ff158c _PyObject_MakeTpCall (/usr/bin/python3.10+0x15658c)
#37 0x000055c967fe9c66 _PyEval_EvalFrameDefault (/usr/bin/python3.10+0x14ec66)
#38 0x000055c9680094e1 (/usr/bin/python3.10+0x16e4e1)
#39 0x000055c967fe50d1 _PyEval_EvalFrameDefault (/usr/bin/python3.10+0x14a0d1)
#40 0x000055c9680094e1 (/usr/bin/python3.10+0x16e4e1)
#41 0x000055c967fe98a2 _PyEval_EvalFrameDefault (/usr/bin/python3.10+0x14e8a2)
#42 0x000055c9680d4e56 (/usr/bin/python3.10+0x239e56)
#43 0x000055c9680d4cf6 PyEval_EvalCode (/usr/bin/python3.10+0x239cf6)
#44 0x000055c9680ff7d8 (/usr/bin/python3.10+0x2647d8)
#45 0x000055c9680f90bb (/usr/bin/python3.10+0x25e0bb)
#46 0x000055c9680ff525 (/usr/bin/python3.10+0x264525)
#47 0x000055c9680fea08 _PyRun_SimpleFileObject (/usr/bin/python3.10+0x263a08)
#48 0x000055c9680fe653 _PyRun_AnyFileObject (/usr/bin/python3.10+0x263653)
#49 0x000055c9680f141e Py_RunMain (/usr/bin/python3.10+0x25641e)
#50 0x000055c9680c7cad Py_BytesMain (/usr/bin/python3.10+0x22ccad)
#51 0x00007f0dfb359d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#52 0x00007f0dfb359e40 call_init ./csu/../csu/libc-start.c:128:20
#53 0x00007f0dfb359e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#54 0x000055c9680c7ba5 _start (/usr/bin/python3.10+0x22cba5)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Instrução ilegal (imagem do núcleo gravada)

@EugeneZelenko EugeneZelenko added mlir crash Prefer [crash-on-valid] or [crash-on-invalid] and removed new issue labels Sep 19, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Sep 19, 2023

@llvm/issue-subscribers-mlir

I tried this code:

from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
from concrete.ml.sklearn import LogisticRegression

Lets create a synthetic data-set

x, y = make_classification(n_samples=100, class_sep=2, n_features=30, random_state=42)

Split the data-set into a train and test set

X_train, X_test, y_train, y_test = train_test_split(
x, y, test_size=0.2, random_state=42
)

Now we train in the clear and quantize the weights

model = LogisticRegression(n_bits=8)
model.fit(X_train, y_train)

We can simulate the predictions in the clear

y_pred_clear = model.predict(X_test)

We then compile on a representative set

model.compile(X_train)

Finally we run the inference on encrypted inputs !

y_pred_fhe = model.predict(X_test, fhe="execute")

print("In clear :", y_pred_clear)
print("In FHE :", y_pred_fhe)
print(f"Similarity: {int((y_pred_fhe == y_pred_clear).mean()*100)}%")

Output:

# In clear  : [0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 1 1 1 0 0]
# In FHE    : [0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 1 1 1 0 0]
# Similarity: 100%

but I got this?

#0 0x00007f0d6bae5b91 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x13b4b91)
#1 0x00007f0d6bae35a4 SignalHandler(int) Signals.cpp:0:0
#2 0x00007f0dfb372520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x00007f0d6fecc652 concrete_optimizer::dag::unparametrized::OperationDag::new::h9a051e100108e97d (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x579b652)
#4 0x00007f0d6fec56aa cxx::unwind::prevent_unwind::hb298ae28e065ccf9 (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x57946aa)
#5 0x00007f0d6fec19da concrete_optimizer::dag::empty() (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x57909da)
#6 0x00007f0d6f17d378 mlir::concretelang::optimizer::(anonymous namespace)::FunctionToDag::build() ConcreteOptimizer.cpp:0:0
#7 0x00007f0d6f17f718 mlir::concretelang::optimizer::DagPass::runOnOperation() (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x4a4e718)
#8 0x00007f0d6ba1f452 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x12ee452)
#9 0x00007f0d6ba1fa29 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x12eea29)
#10 0x00007f0d6ba20a33 mlir::detail::OpToOpPassAdaptor::runOnOperationImpl(bool) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x12efa33)
#11 0x00007f0d6ba1f146 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x12ee146)
#12 0x00007f0d6ba1fa29 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x12eea29)
#13 0x00007f0d6ba20531 mlir::PassManager::run(mlir::Operation*) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x12ef531)
#14 0x00007f0d6d73316b mlir::concretelang::pipeline::getFHEContextFromFHE[abi:cxx11](mlir::MLIRContext&, mlir::ModuleOp&, mlir::concretelang::optimizer::Config, std::function<bool (mlir::Pass*)>) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x300216b)
#15 0x00007f0d6d70c1b0 mlir::concretelang::CompilerEngine::getConcreteOptimizerDescription(mlir::concretelang::CompilerEngine::CompilationResult&) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x2fdb1b0)
#16 0x00007f0d6d70c8dd mlir::concretelang::CompilerEngine::determineFHEParameters(mlir::concretelang::CompilerEngine::CompilationResult&) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x2fdb8dd)
#17 0x00007f0d6d70f9d6 mlir::concretelang::CompilerEngine::compile(llvm::SourceMgr&, mlir::concretelang::CompilerEngine::Target, std::optional<std::shared_ptr<mlir::concretelang::CompilerEngine::Library> >) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x2fde9d6)
#18 0x00007f0d6d7150ac mlir::concretelang::CompilerEngine::compile(llvm::SourceMgr&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, bool, bool, bool, bool) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x2fe40ac)
#19 0x00007f0d6b8b784c mlir::concretelang::LibrarySupport::compile(llvm::SourceMgr&, mlir::concretelang::CompilationOptions) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x118684c)
#20 0x00007f0d6b8ba01a library_compile(LibrarySupport_Py, char const*, mlir::concretelang::CompilationOptions) (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/libConcretelangBindingsPythonCAPI.so+0x118901a)
#21 0x00007f0deb4cfadc (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/_concretelang.cpython-310-x86_64-linux-gnu.so+0x5cadc)
#22 0x00007f0deb4afb4d (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/_concretelang.cpython-310-x86_64-linux-gnu.so+0x3cb4d)
#23 0x00007f0deb496177 (/home/marcelo/Documentos/Projeto/teste3/lib/python3.10/site-packages/mlir/_mlir_libs/_concretelang.cpython-310-x86_64-linux-gnu.so+0x23177)
#24 0x000055c967ffae0e (/usr/bin/python3.10+0x15fe0e)
#25 0x000055c967ff15eb _PyObject_MakeTpCall (/usr/bin/python3.10+0x1565eb)
#26 0x000055c9680097bb (/usr/bin/python3.10+0x16e7bb)
#27 0x000055c967fe98a2 _PyEval_EvalFrameDefault (/usr/bin/python3.10+0x14e8a2)
#28 0x000055c967ffb70c _PyFunction_Vectorcall (/usr/bin/python3.10+0x16070c)
#29 0x000055c967fe3f52 _PyEval_EvalFrameDefault (/usr/bin/python3.10+0x148f52)
#30 0x000055c967ffb70c _PyFunction_Vectorcall (/usr/bin/python3.10+0x16070c)
#31 0x000055c967fe98a2 _PyEval_EvalFrameDefault (/usr/bin/python3.10+0x14e8a2)
#32 0x000055c967ffb70c _PyFunction_Vectorcall (/usr/bin/python3.10+0x16070c)
#33 0x000055c967fe3f52 _PyEval_EvalFrameDefault (/usr/bin/python3.10+0x148f52)
#34 0x000055c967ff0784 _PyObject_FastCallDictTstate (/usr/bin/python3.10+0x155784)
#35 0x000055c968005744 (/usr/bin/python3.10+0x16a744)
#36 0x000055c967ff158c _PyObject_MakeTpCall (/usr/bin/python3.10+0x15658c)
#37 0x000055c967fe9c66 _PyEval_EvalFrameDefault (/usr/bin/python3.10+0x14ec66)
#38 0x000055c9680094e1 (/usr/bin/python3.10+0x16e4e1)
#39 0x000055c967fe50d1 _PyEval_EvalFrameDefault (/usr/bin/python3.10+0x14a0d1)
#40 0x000055c9680094e1 (/usr/bin/python3.10+0x16e4e1)
#41 0x000055c967fe98a2 _PyEval_EvalFrameDefault (/usr/bin/python3.10+0x14e8a2)
#42 0x000055c9680d4e56 (/usr/bin/python3.10+0x239e56)
#43 0x000055c9680d4cf6 PyEval_EvalCode (/usr/bin/python3.10+0x239cf6)
#44 0x000055c9680ff7d8 (/usr/bin/python3.10+0x2647d8)
#45 0x000055c9680f90bb (/usr/bin/python3.10+0x25e0bb)
#46 0x000055c9680ff525 (/usr/bin/python3.10+0x264525)
#47 0x000055c9680fea08 _PyRun_SimpleFileObject (/usr/bin/python3.10+0x263a08)
#48 0x000055c9680fe653 _PyRun_AnyFileObject (/usr/bin/python3.10+0x263653)
#49 0x000055c9680f141e Py_RunMain (/usr/bin/python3.10+0x25641e)
#50 0x000055c9680c7cad Py_BytesMain (/usr/bin/python3.10+0x22ccad)
#51 0x00007f0dfb359d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#52 0x00007f0dfb359e40 call_init ./csu/../csu/libc-start.c:128:20
#53 0x00007f0dfb359e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#54 0x000055c9680c7ba5 _start (/usr/bin/python3.10+0x22cba5)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Instrução ilegal (imagem do núcleo gravada)

@xgupta xgupta changed the title Instrução ilegal (imagem do núcleo gravada) illegal instruction (core-dumped) Sep 20, 2023
@rikhuijzer
Copy link
Member

rikhuijzer commented Oct 4, 2023

Related issues:

All three these issues are related to the Concrete ML (https://github.com/zama-ai/concrete-ml) Python package called concrete-ml.

I'll try to see if I can find the root cause and submit a patch within a few days.

@rikhuijzer
Copy link
Member

@marcelocirilo I have no problems to run your code on an M1 chip:

$ python3.10 tmp.py
In clear  : [0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 1 1 1 0 0]
In FHE    : [0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 1 1 1 0 0]
Similarity: 100%

Could you provide more information such as

$pip show concrete-compiler

and your system? Especially the CPU. Basically anything we could need to reproduce your issue.

It could be that your CPU is too old (zama-ai/concrete-ml#62 (comment)).

@rikhuijzer rikhuijzer changed the title illegal instruction (core-dumped) Crash while running Concrete ML Nov 22, 2023
@rikhuijzer
Copy link
Member

Okay we cannot reproduce and it's probably fixed (either here at MLIR or at concrete-ml (related comment)) since no new reports have come in. I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Prefer [crash-on-valid] or [crash-on-invalid] mlir
Projects
None yet
Development

No branches or pull requests

4 participants