Dynamically determine cores