diff --git a/tests/python/driver/tvmc/test_workspace_pools.py b/tests/python/driver/tvmc/test_workspace_pools.py index 9e73b4c76f96..cb439a5b411b 100644 --- a/tests/python/driver/tvmc/test_workspace_pools.py +++ b/tests/python/driver/tvmc/test_workspace_pools.py @@ -328,3 +328,30 @@ def test_workspace_pools_recombobulate_multi_target_multi_pool(): assert len(memory_pools.pools[0].target_burst_bytes) == 2 assert memory_pools.pools[0].target_burst_bytes[c_target] == 8 assert memory_pools.pools[0].target_burst_bytes[llvm_target] == 4 + + +def test_workspace_pools_recombobulate_parameter_overrides(): + parser = argparse.ArgumentParser() + generate_workspace_pools_args(parser) + parsed, _ = parser.parse_known_args( + [ + "--workspace-pools=sram", + "--workspace-pools-target-access=sram:c:rw", + "--workspace-pools-size-hint-bytes=sram:800", + "--workspace-pools-size-hint-bytes=sram:400", + "--workspace-pools-clock-frequency-hz=sram:4000000", + "--workspace-pools-clock-frequency-hz=sram:3600000", + ] + ) + + c_target = Target("c") + + targets = [c_target] + memory_pools = workspace_pools_recombobulate(parsed, targets) + + assert len(memory_pools.pools) == 1 + + assert len(memory_pools.pools[0].target_access) == 1 + assert memory_pools.pools[0].target_access[c_target] == PoolInfo.READ_WRITE_ACCESS + assert memory_pools.pools[0].size_hint_bytes == 400 + assert memory_pools.pools[0].clock_frequency_hz == 3600000