Skip to content

Conversation

@WoutLegiest
Copy link
Collaborator

Followup after #2237

This PR makes the following changes:
* Uses linalg-to-affine-loops-tensor to lower linalg operations with tensor semantics
* Convert yosys RTLIL to MLIR with tensor semantics
* A few fixes to the secret dialect / patterns to handle secret vs plaintext tensors and insertion operations
* Remove the option for submodule optimization in Yosys - it never worked quite well, and was suited mostly for memref semantics. I think if we want to invest in Yosys compilation more, we should separate that out into a separate pass that prepares the secret.generic functions so that yosys-optimizer isn't doing all these rewrites within its body

PiperOrigin-RevId: 757889057
@WoutLegiest WoutLegiest changed the title [Draft] Followup Remove Tensor from CGGI: Update the Emitters and tests Follow up Remove Tensor from CGGI: Update the Emitters and tests Oct 8, 2025
@WoutLegiest WoutLegiest marked this pull request as ready for review October 8, 2025 09:12
Working secret-to-cggi tests

Working Yosys tests

Only e2e rust not working

Add DenseAttr Emittion to VerilogEmitter
asraa and others added 4 commits October 8, 2025 13:18
This PR makes the following changes:
* Uses linalg-to-affine-loops-tensor to lower linalg operations with tensor semantics
* Convert yosys RTLIL to MLIR with tensor semantics
* A few fixes to the secret dialect / patterns to handle secret vs plaintext tensors and insertion operations
* Remove the option for submodule optimization in Yosys - it never worked quite well, and was suited mostly for memref semantics. I think if we want to invest in Yosys compilation more, we should separate that out into a separate pass that prepares the secret.generic functions so that yosys-optimizer isn't doing all these rewrites within its body

PiperOrigin-RevId: 757889057
Working secret-to-cggi tests

Working Yosys tests

Only e2e rust not working

Add DenseAttr Emittion to VerilogEmitter
All test working again
@j2kun j2kun added the pull_ready Indicates whether a PR is ready to pull. The copybara worker will import for internal testing label Oct 16, 2025
@j2kun
Copy link
Collaborator

j2kun commented Oct 16, 2025

Going to start the process of getting this through copybara

@j2kun j2kun removed the pull_ready Indicates whether a PR is ready to pull. The copybara worker will import for internal testing label Oct 16, 2025
@WoutLegiest
Copy link
Collaborator Author

Note, double check:

  • //tests/Transforms/mlir_to_tfhe_rs:fully_connected.mlir.test
  • //tests/Transforms/mlir_to_tfhe_rs:hello_world_clean_xsmall.mlir.test
  • //tests/Transforms/mlir_to_tfhe_rs:hello_world_small.mlir.test

@asraa
Copy link
Collaborator

asraa commented Oct 23, 2025

Yes! in the import for #2237 I had to fix those tests - I had to add some basic emitter support for some more ops (almost done)

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

Successfully merging this pull request may close these issues.

3 participants