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

rename and split --tosa-to-boolean-XYZ to --mlir-to-scheme plus --to-BACKEND #1573

Closed
asraa opened this issue Mar 17, 2025 · 3 comments · Fixed by #1647
Closed

rename and split --tosa-to-boolean-XYZ to --mlir-to-scheme plus --to-BACKEND #1573

asraa opened this issue Mar 17, 2025 · 3 comments · Fixed by #1647

Comments

@asraa
Copy link
Collaborator

asraa commented Mar 17, 2025

Where backend could be
--to-tfhe-rust-cpu
--to-tfhe-rust-fpt
--to-jaxite

And there are a few options to mlir-to-scheme on whether to use boolean gates or lut3s and the options to vectorize.

As a first step I can split it into --mlir-to-cggi to match with our other RLWE schemes?
WDYT?

Somewhat related to #1417 #1420

and aids me to integrate it into the frontend

@ZenithalHourlyRate
Copy link
Collaborator

Just a note, in arithmetic pipeline the backend passes are named --scheme-to-<backend>.

As a first step I can split it into --mlir-to-cggi to match with our other RLWE schemes?
WDYT?

Agree on this.

@asraa
Copy link
Collaborator Author

asraa commented Mar 18, 2025

Ah gotcha, --mlir-to-cggi and --scheme-to-XYZ backend for now.

@j2kun
Copy link
Collaborator

j2kun commented Mar 18, 2025

+1, Muthu asked on discord this morning how to convert an IR like this

func.func @add(%arg0: i8 {secret.secret}, %arg1: i8 {secret.secret}) -> i8 {
  %0 = arith.addi %arg0, %arg1 : i8
  return %0 : i8
}

To tfhe-rs, and I realized that our only pipeline that handles this is called tosa-to.... I feel like this would also help us more easily define a simplified pipeline for these cases.

copybara-service bot pushed a commit that referenced this issue Apr 2, 2025
Follow-ups:
* I'd also like to unify the arith-to-cggi (non-Yosys) paths with the `--mlir-to-cggi` but I don't know how possible it is given the compile time yosys dependency. I think I could make it work, tbh. In a follow-up #1646
* All the backends that support parallism should use the JaxiteBackendOptions, for now I just wanted to maintain parity with the codebase so only the jaxite pipeline has this option. #1645

fixes #1573

PiperOrigin-RevId: 741191624
copybara-service bot pushed a commit that referenced this issue Apr 2, 2025
Follow-ups:
* I'd also like to unify the arith-to-cggi (non-Yosys) paths with the `--mlir-to-cggi` but I don't know how possible it is given the compile time yosys dependency. I think I could make it work, tbh. In a follow-up #1646
* All the backends that support parallism should use the JaxiteBackendOptions, for now I just wanted to maintain parity with the codebase so only the jaxite pipeline has this option. #1645

fixes #1573

PiperOrigin-RevId: 741191624
copybara-service bot pushed a commit that referenced this issue Apr 2, 2025
Follow-ups:
* I'd also like to unify the arith-to-cggi (non-Yosys) paths with the `--mlir-to-cggi` but I don't know how possible it is given the compile time yosys dependency. I think I could make it work, tbh. In a follow-up #1646
* All the backends that support parallism should use the JaxiteBackendOptions, for now I just wanted to maintain parity with the codebase so only the jaxite pipeline has this option. #1645

fixes #1573

PiperOrigin-RevId: 741191624
copybara-service bot pushed a commit that referenced this issue Apr 2, 2025
Follow-ups:
* I'd also like to unify the arith-to-cggi (non-Yosys) paths with the `--mlir-to-cggi` but I don't know how possible it is given the compile time yosys dependency. I think I could make it work, tbh. In a follow-up #1646
* All the backends that support parallism should use the JaxiteBackendOptions, for now I just wanted to maintain parity with the codebase so only the jaxite pipeline has this option. #1645

fixes #1573

PiperOrigin-RevId: 741191624
copybara-service bot pushed a commit that referenced this issue Apr 2, 2025
Follow-ups:
* I'd also like to unify the arith-to-cggi (non-Yosys) paths with the `--mlir-to-cggi` but I don't know how possible it is given the compile time yosys dependency. I think I could make it work, tbh. In a follow-up #1646
* All the backends that support parallism should use the JaxiteBackendOptions, for now I just wanted to maintain parity with the codebase so only the jaxite pipeline has this option. #1645

fixes #1573

PiperOrigin-RevId: 741191624
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 a pull request may close this issue.

3 participants