Ok i found x[0,1] =1 in the codebase.
The function being called is THPVariable_setitem in torch/csrc/autograd/python_variable_indexing.cpp
Posting this hear in case this could help anyone else in the future.
Now I have an idea of where to look for other functions that are setting values in memory.