Skip to content

Commit

Permalink
Merge branch 'main' into aw/docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
0xawaz authored Feb 18, 2025
2 parents 86ebe17 + b2e287c commit 0f96f93
Show file tree
Hide file tree
Showing 18 changed files with 992 additions and 24 deletions.
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Zama codeowners rules

# All pull request should be reviewed by at least one of the members of httpz-devs
* @zama-ai/httpz-devs

# All CI pull request should be reviewed by at least one of the members of httpz-devops
.github/workflows/* @zama-ai/httpz-devops
2 changes: 1 addition & 1 deletion .github/workflows/cargo-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: foundry-rs/foundry-toolchain@de808b1eea699e761c404bda44ba8f21aba30b2c

- name: Cache cargo
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: |
~/.cargo/registry
Expand Down
3 changes: 3 additions & 0 deletions fhevm-engine/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions fhevm-engine/coprocessor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ nightly-avx512 = ["tfhe/nightly-avx512"]

[dev-dependencies]
testcontainers = "0.21"
fhevm-listener = { path = "../fhevm-listener" }

[build-dependencies]
tonic-build = "0.12"
Expand Down
2 changes: 1 addition & 1 deletion fhevm-engine/coprocessor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub mod server;
mod tests;
pub mod tfhe_worker;
pub mod tracing;
mod types;
pub mod types;
mod utils;

// separate function for testing
Expand Down
1 change: 1 addition & 0 deletions fhevm-engine/coprocessor/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use utils::{
mod errors;
mod inputs;
mod operators;
mod operators_from_events;
mod random;
mod scheduling_bench;
mod utils;
Expand Down
34 changes: 17 additions & 17 deletions fhevm-engine/coprocessor/src/tests/operators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ use std::{ops::Not, str::FromStr};
use strum::IntoEnumIterator;
use tonic::metadata::MetadataValue;

struct BinaryOperatorTestCase {
bits: i32,
operand: i32,
input_types: i32,
expected_output_type: i32,
lhs: BigInt,
rhs: BigInt,
expected_output: BigInt,
is_scalar: bool,
pub struct BinaryOperatorTestCase {
pub bits: i32,
pub operand: i32,
pub input_types: i32,
pub expected_output_type: i32,
pub lhs: BigInt,
pub rhs: BigInt,
pub expected_output: BigInt,
pub is_scalar: bool,
}

struct UnaryOperatorTestCase {
bits: i32,
inp: BigInt,
operand: i32,
operand_types: i32,
expected_output: BigInt,
pub struct UnaryOperatorTestCase {
pub bits: i32,
pub inp: BigInt,
pub operand: i32,
pub operand_types: i32,
pub expected_output: BigInt,
}

fn supported_bits() -> &'static [i32] {
Expand Down Expand Up @@ -727,7 +727,7 @@ async fn test_fhe_if_then_else() -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}

fn generate_binary_test_cases() -> Vec<BinaryOperatorTestCase> {
pub fn generate_binary_test_cases() -> Vec<BinaryOperatorTestCase> {
let mut cases = Vec::new();
let bit_shift_ops = [
SupportedFheOperations::FheShl,
Expand Down Expand Up @@ -836,7 +836,7 @@ fn generate_binary_test_cases() -> Vec<BinaryOperatorTestCase> {
cases
}

fn generate_unary_test_cases() -> Vec<UnaryOperatorTestCase> {
pub fn generate_unary_test_cases() -> Vec<UnaryOperatorTestCase> {
let mut cases = Vec::new();

for bits in supported_bits() {
Expand Down
Loading

0 comments on commit 0f96f93

Please sign in to comment.