The root modules and concrete compiler llvm project

mlir._mlir_libs._concretelang._compiler
Can somebody point out where is the location of these modules
_mlir,_concretelang, as most of the operations interfaced through bindings ( may be it server call, primitive operations, library support etc) ,I am not sure if would find it in our installed directory as it is compiled to shared library object?

I would also request members to make blogs on concrete compiler llvm project

Are you working with an officially built wheel ? Or are you building the python package on your own ?

If you are building the package on your own, you must ensure to add build/tools/concretelang/python_packages/concretelang_core to your python path for the libraries to be properly found.

1 Like

No just trying to delve on architecture for now ,will also work in that direction
mlir._mlir_libs._concretelang._compiler,
I want to get to core defn of classes inside
from mlir._mlir_libs._concretelang._compiler import (
CompilationOptions as _CompilationOptions,
OptimizerStrategy as _OptimizerStrategy,
OptimizerMultiParameterStrategy as _OptimizerMultiParameterStrategy,
Encoding,
Backend as _Backend,
)

also tried building the wheel : got this
pip3 wheel --no-deps -w …/wheels .
Processing concrete/compilers/concrete-compiler/compiler
Preparing metadata (setup.py) … done
Building wheels for collected packages: concrete-compiler
Building wheel for concrete-compiler (setup.py) … error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [34 lines of output]
anaconda3/envs/concrete/lib/python3.8/site-packages/setuptools/init.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************
  
  !!
    dist.fetch_build_eggs(dist.setup_requires)
  /home/user/anaconda3/envs/concrete/lib/python3.8/site-packages/setuptools/dist.py:509: InformationOnly: Normalizing '0.1.0-rc1' to '0.1.0rc1'
    self.metadata.version = self._normalize_version(
  running bdist_wheel
  running build
  running build_py
  creating build/lib.linux-x86_64-cpython-38
  creating build/lib.linux-x86_64-cpython-38/concrete
  copying build/tools/concretelang/python_packages/concretelang_core/concrete/__init__.py -> build/lib.linux-x86_64-cpython-38/concrete
  creating build/lib.linux-x86_64-cpython-38/concrete/lang
  copying build/tools/concretelang/python_packages/concretelang_core/concrete/lang/__init__.py -> build/lib.linux-x86_64-cpython-38/concrete/lang
  creating build/lib.linux-x86_64-cpython-38/concrete/compiler
  copying build/tools/concretelang/python_packages/concretelang_core/concrete/compiler/compilation_options.py -> build/lib.linux-x86_64-cpython-38/concrete/compiler
  copying build/tools/concretelang/python_packages/concretelang_core/concrete/compiler/public_arguments.py -> build/lib.linux-x86_64-cpython-38/concrete/compiler
  copying build/tools/concretelang/python_packages/concretelang_core/concrete/compiler/lambda_argument.py -> build/lib.linux-x86_64-cpython-38/concrete/compiler
  copying build/tools/concretelang/python_packages/concretelang_core/concrete/compiler/evaluation_keys.py -> build/lib.linux-x86_64-cpython-38/concrete/compiler
  copying build/tools/concretelang/python_packages/concretelang_core/concrete/compiler/value.py -> build/lib.linux-x86_64-cpython-38/concrete/compiler
  copying build/tools/concretelang/python_packages/concretelang_core/concrete/compiler/key_set_cache.py -> build/lib.linux-x86_64-cpython-38/concrete/compiler
  copying build/tools/concretelang/python_packages/concretelang_core/concrete/compiler/value_exporter.py -> build/lib.linux-x86_64-cpython-38/concrete/compiler
  copying build/tools/concretelang/python_packages/concretelang_core/concrete/compiler/library_support.py -> build/lib.linux-x86_64-cpython-38/concrete/compiler
  copying build/tools/concretelang/python_packages/concretelang_core/concrete/compiler/public_result.py -> build/lib.linux-x86_64-cpython-38/concrete/compiler
  copying build/tools/concretelang/python_packages/concretelang_core/concrete/compiler/compilation_context.py -> build/lib.linux-x86_64-cpython-38/concrete/compiler
  copying build/tools/concretelang/python_packages/concretelang_core/concrete/compiler/client_support.py -> build/lib.linux-x86_64-cpython-38/concrete/compiler
  copying build/tools/concretelang/python_packages/concretelang_core/concrete/compiler/value_decrypter.py -> build/lib.linux-x86_64-cpython-38/concrete/compiler
  error: can't copy 'build/tools/concretelang/python_packages/concretelang_core/concrete/compiler/jit_lambda.py': doesn't exist or not a regular file
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for concrete-compiler
Running setup.py clean for concrete-compiler
Failed to build concrete-compiler
ERROR: Failed to build one or more wheels

Creating wheel for Concrete Python is not so simple. It’s not documented as it’s an internal complexity, but if you really want to understand it, you can take a look at:

1 Like

Thankyou @umutsahin I will have a look at it