Depends on what restaurant you want. If you want a popular one, or a peak mealtime, you should make a reservation as early as you can, but you ought to be able to get in somewhere if you're not picky about where you eat.
Personally I'd still make a same-day reservation before I'd try to walk in somewhere.
You should be okay with all but the most popular places if you make your reservations before August.
If you are interested in the food & wine festival special events, those are usually not released for booking until the end of July/beginning of August.