Even accepting the worst possible picture you can paint of Gandhi's racism, which doesn't seem an accurate view of his whole life, his anti-imperialist views would likely still be a net positive.
tbh if he had a viewpoint, good or bad, but wasn't significantly influential with it, does it matter?
Is this related to the lines he recanted later? Which groups?