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

feat(frontend-python): disable and print tlu fusing #749

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

umut-sahin
Copy link
Contributor

No description provided.

@umut-sahin umut-sahin force-pushed the feat/disable-and-print-fusing branch from cf2f1dd to 7b524d6 Compare March 18, 2024 05:12
@BourgerieQuentin BourgerieQuentin merged commit d13b283 into main Mar 19, 2024
31 checks passed
@BourgerieQuentin BourgerieQuentin deleted the feat/disable-and-print-fusing branch March 19, 2024 08:39
fhe.inputset(fhe.tensor[fhe.uint3, 3]), # type: ignore
helpers.configuration().fork(enable_tlu_fusing=False),
)
assert circuit4.programmable_bootstrap_count == 6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • no need to check the default?
  • no need to check print_tlu_fusing works as expected?
    @BourgerieQuentin

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to check print_tlu_fusing works as expected?

This is impossible to check as printing happens in C++.

no need to check the default?

Default is just a boolean and as long as we test both True and False cases, we're testing the default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • OK for prints, but sad
  • For default: I would add
  # Fused Tensor
    compiler3 = Compiler(f, {"x": "encrypted"})
    circuit3 = compiler3.compile(
        fhe.inputset(fhe.tensor[fhe.uint3, 3]),  # type: ignore
        helpers.configuration().fork(),
    )
    assert circuit3.programmable_bootstrap_count == 3

or something like that, to check we have really the default we want to have

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

helpers.configuration().fork()

This doesn't make sense as we're not testing with the default configuration, we have a custom test configuration.

to check we have really the default we want to have

I'll include this piece of code in the beginning of this test:

    # Make sure it's enabled by default
    default_configuration = fhe.Configuration()
    assert default_configuration.enable_tlu_fusing

as a commit to another PR of mine. Sounds good?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

(I have not understood why my proposal doesn't make sense, you could take a default config and do what I said)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants