File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 11import pytest
22import openfhe as fhe
33
4- pytestmark = pytest .mark .skipif (fhe .get_native_int () != 128 , reason = "Only for NATIVE_INT=128" )
4+ @pytest .mark .skipif (fhe .get_native_int () != 128 , reason = "Only for NATIVE_INT=128" )
5+ @pytest .mark .parametrize ("scaling" , [fhe .FIXEDAUTO , fhe .FIXEDMANUAL ])
6+ def test_ckks_context_nativeint128 (scaling ):
7+ batch_size = 8
8+ parameters = fhe .CCParamsCKKSRNS ()
9+ parameters .SetMultiplicativeDepth (5 )
10+ parameters .SetScalingModSize (78 )
11+ parameters .SetBatchSize (batch_size )
12+ parameters .SetScalingTechnique (scaling )
13+ parameters .SetNumLargeDigits (2 )
14+ cc = fhe .GenCryptoContext (parameters )
15+ assert isinstance (cc , fhe .CryptoContext )
16+
517
618@pytest .mark .parametrize ("scaling" , [fhe .FIXEDAUTO , fhe .FIXEDMANUAL ])
719def test_ckks_context (scaling ):
820 batch_size = 8
921 parameters = fhe .CCParamsCKKSRNS ()
1022 parameters .SetMultiplicativeDepth (5 )
11- parameters .SetScalingModSize (78 )
23+ parameters .SetScalingModSize (60 - 1 )
1224 parameters .SetBatchSize (batch_size )
1325 parameters .SetScalingTechnique (scaling )
1426 parameters .SetNumLargeDigits (2 )
You can’t perform that action at this time.
0 commit comments