mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 12:15:09 -05:00
fix(compiler): JIT unit tests: Don't compare expressions of different signedness
Fix compiler warnings in `end_to_end_jit_clear_tensor.cc` and `end_to_end_jit_encrypted_tensor.cc` due to the comparison of integer expressions of different signedness.
This commit is contained in:
committed by
Quentin Bourgerie
parent
97389a3b06
commit
5cc551dd4f
@@ -222,8 +222,8 @@ func @main(%t: tensor<2x10xi64>, %i: index, %j: index) -> i64 {
|
||||
mlir::zamalang::IntLambdaArgument<uint64_t>>
|
||||
arg(tensor2D, shape2D);
|
||||
|
||||
for (size_t i = 0; i < dims[0]; i++) {
|
||||
for (size_t j = 0; j < dims[1]; j++) {
|
||||
for (int64_t i = 0; i < dims[0]; i++) {
|
||||
for (int64_t j = 0; j < dims[1]; j++) {
|
||||
auto pos = i * dims[1] + j;
|
||||
mlir::zamalang::IntLambdaArgument<size_t> argi(i);
|
||||
mlir::zamalang::IntLambdaArgument<size_t> argj(j);
|
||||
@@ -251,7 +251,7 @@ func @main(%t: tensor<2x10xi64>) -> tensor<1x5xi64> {
|
||||
|
||||
ASSERT_EXPECTED_SUCCESS(res);
|
||||
|
||||
ASSERT_EQ(res->size(), 1 * 5);
|
||||
ASSERT_EQ(res->size(), (size_t)1 * 5);
|
||||
|
||||
// Check the sub slice
|
||||
for (size_t j = 0; j < 5; j++) {
|
||||
@@ -279,7 +279,7 @@ func @main(%t: tensor<2x10xi64>) -> tensor<1x5xi64> {
|
||||
|
||||
ASSERT_EXPECTED_SUCCESS(res);
|
||||
|
||||
ASSERT_EQ(res->size(), 1 * 5);
|
||||
ASSERT_EQ(res->size(), (size_t)1 * 5);
|
||||
|
||||
// Check the sub slice
|
||||
for (size_t j = 0; j < 5; j++) {
|
||||
|
||||
@@ -53,8 +53,8 @@ func @main(%t: tensor<2x10x!HLFHE.eint<6>>, %i: index, %j: index) ->
|
||||
mlir::zamalang::IntLambdaArgument<uint8_t>>
|
||||
arg(tensor2D, shape2D);
|
||||
|
||||
for (size_t i = 0; i < dims[0]; i++) {
|
||||
for (size_t j = 0; j < dims[1]; j++) {
|
||||
for (int64_t i = 0; i < dims[0]; i++) {
|
||||
for (int64_t j = 0; j < dims[1]; j++) {
|
||||
auto pos = i * dims[1] + j;
|
||||
mlir::zamalang::IntLambdaArgument<size_t> argi(i);
|
||||
mlir::zamalang::IntLambdaArgument<size_t> argj(j);
|
||||
@@ -81,7 +81,7 @@ func @main(%t: tensor<2x10x!HLFHE.eint<6>>) -> tensor<1x5x!HLFHE.eint<6>> {
|
||||
|
||||
ASSERT_EXPECTED_SUCCESS(res);
|
||||
|
||||
ASSERT_EQ(res->size(), 1 * 5);
|
||||
ASSERT_EQ(res->size(), (size_t)1 * 5);
|
||||
|
||||
// Check the sub slice
|
||||
for (size_t j = 0; j < 5; j++) {
|
||||
@@ -109,7 +109,7 @@ func @main(%t: tensor<2x10x!HLFHE.eint<6>>) -> tensor<1x5x!HLFHE.eint<6>> {
|
||||
|
||||
ASSERT_EXPECTED_SUCCESS(res);
|
||||
|
||||
ASSERT_EQ(res->size(), 1 * 5);
|
||||
ASSERT_EQ(res->size(), (size_t)1 * 5);
|
||||
|
||||
// Check the sub slice
|
||||
for (size_t j = 0; j < 5; j++) {
|
||||
|
||||
@@ -31,7 +31,7 @@ TEST(End2EndJit_HLFHELinalg, add_eint_int_term_to_term) {
|
||||
|
||||
ASSERT_EXPECTED_SUCCESS(res);
|
||||
|
||||
ASSERT_EQ(res->size(), 4);
|
||||
ASSERT_EQ(res->size(), (size_t)4);
|
||||
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
EXPECT_EQ((*res)[i], a0[i] + a1[i]);
|
||||
|
||||
Reference in New Issue
Block a user