Skip to content

Commit 47b3b7e

Browse files
Add TPC v5.0 for SDSP converter v3.18 (#1640)
1 parent 7362d54 commit 47b3b7e

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

model_compression_toolkit/target_platform_capabilities/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
SDSP_V3_14 = '3.14'
3232
SDSP_V3_16 = '3.16'
3333
SDSP_V3_17 = '3.17'
34+
SDSP_V3_18 = '3.18'
3435

3536
# TP Attributes
3637
KERNEL_ATTR = "kernel_attr"

model_compression_toolkit/target_platform_capabilities/tpc_models/get_target_platform_capabilities.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
# ==============================================================================
1515
from model_compression_toolkit.target_platform_capabilities.constants import IMX500_TP_MODEL, TPC_V1_0, TPC_V4_0, TPC_V5_0, \
16-
SDSP_V3_14, SDSP_V3_16, SDSP_V3_17
16+
SDSP_V3_14, SDSP_V3_16, SDSP_V3_17, SDSP_V3_18
1717
from model_compression_toolkit.target_platform_capabilities.schema.mct_current_schema import TargetPlatformCapabilities
1818
from model_compression_toolkit.target_platform_capabilities.tpc_models import generate_tpc_func
1919

@@ -56,6 +56,7 @@ def get_target_platform_capabilities_sdsp(sdsp_version: str = SDSP_V3_14) -> Tar
5656
SDSP_V3_14: TPC_V1_0,
5757
SDSP_V3_16: TPC_V4_0,
5858
SDSP_V3_17: TPC_V5_0,
59+
SDSP_V3_18: TPC_V5_0,
5960
}
6061

6162
msg = (f"Error: The specified sdsp converter version '{sdsp_version}' is not valid. "

tests_pytest/common_tests/unit_tests/target_platform_capabilities/test_sdsp_api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,14 @@ def test_sdsp_api():
4747
# Sdsp converter v3.17
4848
APITest(sdsp_version='3.17').run_test(
4949
expected_tpc_path='model_compression_toolkit.target_platform_capabilities.tpc_models.imx500_tpc.v5_0.tpc', expected_tpc_version='5.0')
50+
51+
# Sdsp converter v3.18
52+
APITest(sdsp_version='3.18').run_test(
53+
expected_tpc_path='model_compression_toolkit.target_platform_capabilities.tpc_models.imx500_tpc.v5_0.tpc', expected_tpc_version='5.0')
5054

5155

5256
def test_false_sdsp_api():
5357
# Sdsp converter v3.15
5458
with pytest.raises(AssertionError, match="Error: The specified sdsp converter version '3.15' is not valid. Available "
55-
"versions are: 3.14, 3.16, 3.17. Please ensure you are using a supported sdsp converter version."):
59+
"versions are: 3.14, 3.16, 3.17, 3.18. Please ensure you are using a supported sdsp converter version."):
5660
APITest(sdsp_version='3.15').run_test(expected_tpc_path='', expected_tpc_version='')

0 commit comments

Comments
 (0)