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

Intro post contains outdated code #1199

Open
Frollamma opened this issue Jan 17, 2025 · 1 comment
Open

Intro post contains outdated code #1199

Frollamma opened this issue Jan 17, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Frollamma
Copy link

Frollamma commented Jan 17, 2025

Summary

Code from the introductory post referenced in the README isn't running, I suppose it's just outdated. I think it should be updated since it's referenced in this repo.

Description

By running the following code (copy pasted from https://www.zama.ai/post/zama-concrete-fully-homomorphic-encryption-compiler)

import concrete.compiler as compiler

mlir_input = """
   func.func @main(%arg0: !FHE.eint<6>, %arg1: !FHE.eint<6>) -> !FHE.eint<6> {
       %result = "FHE.add_eint"(%arg0, %arg1): (!FHE.eint<6>, !FHE.eint<6>) -> (!FHE.eint<6>)
       return %result: !FHE.eint<6>
   }"""

# create a new compiler engine that will write artifacts to the `out` directory
engine = compiler.LibrarySupport.new("./out")

# create the default compilation options, you can modify those at your convenience via the `set_*` methods
options = compiler.CompilationOptions.new()

# use the compiler engine to compile the program with the options you defined
compilation_result = engine.compile(mlir_input, options)

I get this error

    engine = compiler.LibrarySupport.new("./out")
             ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'concrete.compiler' has no attribute 'LibrarySupport'

I tried to substitute LibrarySupport.new with Library.__new__ (that are defined) but I had no luck.

System info

I'm running on Python 3.12.8 and concrete-python 2.9.0.

@Frollamma Frollamma added the bug Something isn't working label Jan 17, 2025
@BourgerieQuentin
Copy link
Member

Hello @Frollamma , thank you for reporting. Indeed low-level python bindings of concrete-compiler has been refactored and this code is now out of date. Thank you for reporting, we will change the python code in the blog post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants