aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_backend_vela_compiler.py6
-rw-r--r--tests/test_nn_tensorflow_tflite_metrics.py6
-rw-r--r--tests/test_target_ethos_u_config.py2
3 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_backend_vela_compiler.py b/tests/test_backend_vela_compiler.py
index ff07c74..20121d6 100644
--- a/tests/test_backend_vela_compiler.py
+++ b/tests/test_backend_vela_compiler.py
@@ -27,7 +27,7 @@ def test_default_vela_compiler() -> None:
assert default_compiler.tensor_allocator == TensorAllocator.HillClimb
assert default_compiler.cpu_tensor_alignment == 16
assert default_compiler.optimization_strategy == OptimizationStrategy.Performance
- assert default_compiler.output_dir is None
+ assert default_compiler.output_dir == "output"
assert default_compiler.get_config() == {
"accelerator_config": "ethos-u55-256",
@@ -86,7 +86,7 @@ def test_vela_compiler_with_parameters(test_resources_path: Path) -> None:
tensor_allocator="Greedy",
cpu_tensor_alignment=4,
optimization_strategy="Size",
- output_dir="output",
+ output_dir="custom_output",
)
compiler = VelaCompiler(compiler_options)
@@ -99,7 +99,7 @@ def test_vela_compiler_with_parameters(test_resources_path: Path) -> None:
assert compiler.tensor_allocator == TensorAllocator.Greedy
assert compiler.cpu_tensor_alignment == 4
assert compiler.optimization_strategy == OptimizationStrategy.Size
- assert compiler.output_dir == "output"
+ assert compiler.output_dir == "custom_output"
assert compiler.get_config() == {
"accelerator_config": "ethos-u65-256",
diff --git a/tests/test_nn_tensorflow_tflite_metrics.py b/tests/test_nn_tensorflow_tflite_metrics.py
index 0e4c79c..e8d7c09 100644
--- a/tests/test_nn_tensorflow_tflite_metrics.py
+++ b/tests/test_nn_tensorflow_tflite_metrics.py
@@ -34,10 +34,10 @@ def _sample_keras_model() -> tf.keras.Model:
def _sparse_binary_keras_model() -> tf.keras.Model:
def get_sparse_weights(shape: list[int]) -> np.ndarray:
weights = np.zeros(shape)
- with np.nditer(weights, op_flags=["writeonly"]) as weight_iterator:
- for idx, value in enumerate(weight_iterator):
+ with np.nditer(weights, op_flags=[["writeonly"]]) as weight_it:
+ for idx, value in enumerate(weight_it):
if idx % 2 == 0:
- value[...] = 1.0
+ value[...] = 1.0 # type: ignore
return weights
keras_model = _sample_keras_model()
diff --git a/tests/test_target_ethos_u_config.py b/tests/test_target_ethos_u_config.py
index 6ccd5ce..3160190 100644
--- a/tests/test_target_ethos_u_config.py
+++ b/tests/test_target_ethos_u_config.py
@@ -28,7 +28,7 @@ def test_compiler_options_default_init() -> None:
assert opts.tensor_allocator == "HillClimb"
assert opts.cpu_tensor_alignment == 16
assert opts.optimization_strategy == "Performance"
- assert opts.output_dir is None
+ assert opts.output_dir == "output"
def test_ethosu_target() -> None: