[WIP]:Automatic resource partitioning