Does one have to do hafrashas challah from dough intended for doughnuts

According to the Shulchan Aruch, there’s no need to separate challah from dough intended for deep-frying, whether the dough is a thick dough or thin batter. This is the custom among Sephardim.

However there are poskim who hold that one should abide by the Rishonim’s opinion that challah should be separated, and therefore challah should be separated without a bracha, as is the custom among Ashkenazim.

In a case where the dough is large enough to require hafrashas challah, and one bakes the doughnuts in the oven (as some bakeries do), or if even a small part of the dough will be baked, one has to do hafrashas challah with a bracha.