Skip to content

Commit

Permalink
chore(frontend-python): Run minimal tests on macos and gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
BourgerieQuentin committed Nov 29, 2024
1 parent 46c39b2 commit 4498781
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 15 deletions.
17 changes: 4 additions & 13 deletions frontends/concrete-python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ pytest-default: tfhers-utils
--key-cache "${KEY_CACHE_DIRECTORY}" \
-m "${PYTEST_MARKERS}"

pytest-macos: tfhers-utils
pytest-macos:
pytest tests -svv -n auto \
--key-cache "${KEY_CACHE_DIRECTORY}" \
-m "${PYTEST_MARKERS}"
-m "${PYTEST_MARKERS} minimal"

pytest-single: tfhers-utils
eval $(shell make silent_cp_activate)
Expand All @@ -98,21 +98,12 @@ pytest-multi: tfhers-utils
--key-cache "${KEY_CACHE_DIRECTORY}" \
-m "${PYTEST_MARKERS}"

pytest-gpu: tfhers-utils
pytest-gpu:
eval $(shell make silent_cp_activate)
# test single precision
pytest tests -svv -n0 --use_gpu \
--key-cache "${KEY_CACHE_DIRECTORY}" \
-m "${PYTEST_MARKERS}"

# test multi precision
pytest tests -svv -n0 --use_gpu \
--precision=multi \
--cov=concrete.fhe \
--cov-fail-under=100 \
--cov-report=term-missing:skip-covered \
--key-cache "${KEY_CACHE_DIRECTORY}" \
-m "${PYTEST_MARKERS}"
-m "${PYTEST_MARKERS} minimal"

benchmark:
eval $(shell make silent_cp_activate)
Expand Down
1 change: 1 addition & 0 deletions frontends/concrete-python/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
markers =
dataflow: mark the test as using dataflow parallelization.
graphviz: mark the test using graphviz package
minimal: mark the minimal test to run
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def function(x, y):

assert np.array_equal(x_plus_y, x + np.array(y))


@pytest.mark.minimal
def test_client_server_api(helpers):
"""
Test client/server API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def a(x, y):

assert Fixed.compile(inputsets)


@pytest.mark.minimal
def test_client_server_api(helpers):
"""
Test client/server API of modules.
Expand Down
2 changes: 2 additions & 0 deletions frontends/concrete-python/tests/execution/test_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
},
],
)
@pytest.mark.minimal
def test_constant_add(function, parameters, helpers):
"""
Test add where one of the operators is a constant.
Expand Down Expand Up @@ -164,6 +165,7 @@ def test_constant_add(function, parameters, helpers):
},
],
)
@pytest.mark.minimal
def test_add(function, parameters, helpers):
"""
Test add where both of the operators are dynamic.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def negative_identity_table_lookup_generator(n):
pytest.param(6, negative_identity_table_lookup_generator(6)),
],
)
@pytest.mark.minimal
def test_direct_table_lookup(bits, function, helpers):
"""
Test direct table lookup.
Expand Down
1 change: 1 addition & 0 deletions frontends/concrete-python/tests/execution/test_mul.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def test_constant_mul(function, parameters, helpers):
},
],
)
@pytest.mark.minimal
def test_mul(function, parameters, helpers):
"""
Test mul where both of the operators are dynamic.
Expand Down

0 comments on commit 4498781

Please sign in to comment.