Merged global and carry. Input and output states are now dp.BaseTensors