Just a correction there wd should read dw.
DATEADD(dd, 1 - DATEPART(dw, GETDATE()), GETDATE())
However if you want to always get the Sunday date without having to do anything more in your code and no need to worry about datefirst value then do
(note this also sets the time value of the date to midnight Sunday. To get Monday use 0 instead of -1, Tuesday use 1 and so on).
DATEADD(wk, DATEDIFF(wk,-1,GETDATE()), -1)