The most likely reason that your cauliflower mash is grainy is that the cauliflower is under-cooked. Make sure that each of the cauliflower florets can easily be pierced with a fork before you blend them up into the mash.