diff --git a/docs/source/jit.rst b/docs/source/jit.rst index 2d7ead8a817b..53c2ff44e3e7 100644 --- a/docs/source/jit.rst +++ b/docs/source/jit.rst @@ -942,7 +942,7 @@ Tracer Warnings Produces several warnings and a graph which simply returns the input:: - fill_row_zero.py:4: TracerWarning: There are 2 live references to the data region being modified when tracing in-place operator copy_ (possibly due to an assignment). This might cause the trace to be incorrect, because all other views that also reference this data will not not reflect this change in the trace! On the other hand, if all other views use the same memory chunk, but are disjoint (e.g. are outputs of torch.split), this might still be safe. + fill_row_zero.py:4: TracerWarning: There are 2 live references to the data region being modified when tracing in-place operator copy_ (possibly due to an assignment). This might cause the trace to be incorrect, because all other views that also reference this data will not reflect this change in the trace! On the other hand, if all other views use the same memory chunk, but are disjoint (e.g. are outputs of torch.split), this might still be safe. x[0] = torch.rand(*x.shape[1:2]) fill_row_zero.py:6: TracerWarning: Output nr 1. of the traced function does not match the corresponding output of the Python function. Detailed error: Not within tolerance rtol=1e-05 atol=1e-05 at input[0, 1] (0.09115803241729736 vs. 0.6782537698745728) and 3 other locations (33.00%) diff --git a/torch/csrc/jit/tracer.cpp b/torch/csrc/jit/tracer.cpp index de64e69cabb2..c3a89b87865a 100644 --- a/torch/csrc/jit/tracer.cpp +++ b/torch/csrc/jit/tracer.cpp @@ -511,7 +511,7 @@ void ensureUniqueIfOutOfPlaced(const char* name, const at::Tensor& tensor) { << " live references to the data region being modified when tracing in-place operator " << name << ". This might cause the trace to be incorrect, because all other views " - << "that also reference this data will not not reflect this change in the trace! " + << "that also reference this data will not reflect this change in the trace! " << "On the other hand, if all other views use the same memory chunk, but are disjoint (e.g. " << "are outputs of torch.split), this might still be safe."; warn(ss.str().c_str());