Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
irenaby committed Jan 14, 2025
1 parent 949b786 commit efd0308
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,6 @@ def compare(self, quantized_model, float_model, input_x=None, quantization_info=
# test with its current setup (therefore, we don't check the input layer's bitwidth)
self.unit_test.assertTrue((activation_bits == [4, 8]))

# Verify final resource utilization
self.unit_test.assertTrue(
quantization_info.final_resource_utilization.total_memory ==
quantization_info.final_resource_utilization.weights_memory + quantization_info.final_resource_utilization.activation_memory,
"Running weights and activation mixed-precision, "
"final total memory should be equal to sum of weights and activation memory.")


class MixedPrecisionActivationSearch2BitsAvgTest(MixedPrecisionActivationBaseTest):
def __init__(self, unit_test):
Expand All @@ -206,13 +199,6 @@ def compare(self, quantized_model, float_model, input_x=None, quantization_info=
activation_layers_idx=self.activation_layers_idx,
unique_tensor_values=4)

# Verify final resource utilization
self.unit_test.assertTrue(
quantization_info.final_resource_utilization.total_memory ==
quantization_info.final_resource_utilization.weights_memory + quantization_info.final_resource_utilization.activation_memory,
"Running weights and activation mixed-precision, "
"final total memory should be equal to sum of weights and activation memory.")


class MixedPrecisionActivationDepthwiseTest(MixedPrecisionActivationBaseTest):
def __init__(self, unit_test):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,6 @@ def compare(self, quantized_model, float_model, input_x=None, quantization_info=
self.unit_test.assertTrue(quantization_info.final_resource_utilization.activation_memory <=
self.target_total_ru.activation_memory)

self.unit_test.assertTrue(
quantization_info.final_resource_utilization.weights_memory + quantization_info.final_resource_utilization.activation_memory ==
quantization_info.final_resource_utilization.total_memory,
"Running weights mixed-precision with unconstrained Resource Utilization, "
"final weights and activation memory sum should be equal to total memory.")


class MixedPrecisionSearchTotalMemoryNonConfNodesTest(MixedPrecisionBaseTest):
def __init__(self, unit_test):
Expand All @@ -362,11 +356,6 @@ def compare(self, quantized_model, float_model, input_x=None, quantization_info=
# we're only interested in the ResourceUtilization
self.unit_test.assertTrue(
quantization_info.final_resource_utilization.total_memory <= self.target_total_ru.total_memory)
self.unit_test.assertTrue(
quantization_info.final_resource_utilization.weights_memory + quantization_info.final_resource_utilization.activation_memory ==
quantization_info.final_resource_utilization.total_memory,
"Running weights mixed-precision with unconstrained ResourceUtilization, "
"final weights and activation memory sum should be equal to total memory.")


class MixedPrecisionDepthwiseTest(MixedPrecisionBaseTest):
Expand Down

0 comments on commit efd0308

Please sign in to comment.