gpu: extract effective grid size from schedule tree