Yes, that’s correct.
Both share the underlying data of the tensor and have requires_grad=False.
While using x.data is unrelated to the computation graph, x.detach will have its in-place changes reported by autograd if x is needed in backward and will raise an error if necessary.
There is an example in the Migration Guide 245 in the “What about .data?” section.