NEC 430.122 dictates that for feeding a VFD, the line side conductors must be sized for at least 125% of the VFD rated input current rating (2 or 3 Hp is typically 20A/14AWG or 30A/10AWG breaker, wiring is specific to the breaker). It is not a factor of what the VFD is driving, the output (motor) wire is at least 125% of the motor FLA (assuming shorter cables), but would normally be 14-16 AWG for 2Hp @230V 3 phase. Also depends if the VFD power cable is a plug or hardwired. The input power wire size that may be used is a function of the breaker as well as the type of load. VFD manufactures will give recommendations as to breaker/fuse sizing as well as motor gauge in the manual. Typically a single phase 20A breaker for a 2Hp (230V) VFD is sufficient, in particular for a surface grinder which is a light load. The VFD output needs to be directly connected to the surface grinder motor and not used as a general machine power source.