For (good) reasons, .as_strided() is actually supported by the autograd, so that will work 
But even beyond that, here, since you override all the content of a anyway with the copy, all the gradients will flow towards b and the original value of a will just get 0s.
So autograd will work just fine