Skip to content

Commit

Permalink
Lint trailing newlines (pytorch#54737)
Browse files Browse the repository at this point in the history
Summary:
*Context:* pytorch#53406 added a lint for trailing whitespace at the ends of lines. However, in order to pass FB-internal lints, that PR also had to normalize the trailing newlines in four of the files it touched. This PR adds an OSS lint to normalize trailing newlines.

The changes to the following files (made in 54847d0) are the only manually-written parts of this PR:

- `.github/workflows/lint.yml`
- `mypy-strict.ini`
- `tools/README.md`
- `tools/test/test_trailing_newlines.py`
- `tools/trailing_newlines.py`

I would have liked to make this just a shell one-liner like the other three similar lints, but nothing I could find quite fit the bill. Specifically, all the answers I tried from the following Stack Overflow questions were far too slow (at least a minute and a half to run on this entire repository):

- [How to detect file ends in newline?](https://stackoverflow.com/q/38746)
- [How do I find files that do not end with a newline/linefeed?](https://stackoverflow.com/q/4631068)
- [How to list all files in the Git index without newline at end of file](https://stackoverflow.com/q/27624800)
- [Linux - check if there is an empty line at the end of a file [duplicate]](https://stackoverflow.com/q/34943632)
- [git ensure newline at end of each file](https://stackoverflow.com/q/57770972)

To avoid giving false positives during the few days after this PR is merged, we should probably only merge it after pytorch#54967.

Pull Request resolved: pytorch#54737

Test Plan:
Running the shell script from the "Ensure correct trailing newlines" step in the `quick-checks` job of `.github/workflows/lint.yml` should print no output and exit in a fraction of a second with a status of 0. That was not the case prior to this PR, as shown by this failing GHA workflow run on an earlier draft of this PR:

- https://github.com/pytorch/pytorch/runs/2197446987?check_suite_focus=true

In contrast, this run (after correcting the trailing newlines in this PR) succeeded:

- https://github.com/pytorch/pytorch/pull/54737/checks?check_run_id=2197553241

To unit-test `tools/trailing_newlines.py` itself (this is run as part of our "Test tools" GitHub Actions workflow):
```
python tools/test/test_trailing_newlines.py
```

Reviewed By: malfet

Differential Revision: D27409736

Pulled By: samestep

fbshipit-source-id: 46f565227046b39f68349bbd5633105b2d2e9b19
  • Loading branch information
samestep authored and facebook-github-bot committed Mar 30, 2021
1 parent eafa235 commit 5bcbbf5
Show file tree
Hide file tree
Showing 111 changed files with 122 additions and 132 deletions.
1 change: 0 additions & 1 deletion .circleci/windows-jni/include/jni.h
Original file line number Diff line number Diff line change
Expand Up @@ -1129,4 +1129,3 @@ JNIEXPORT void JNI_OnUnload(JavaVM* vm, void* reserved);
#define JNI_ABORT 2 /* free buffer w/o copying back */

#endif /* JNI_H_ */

3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
rm -r "shellcheck-${scversion}"
shellcheck --version
.jenkins/run-shellcheck.sh
- name: Ensure correct trailing newlines
run: |
(! git grep -Il '' -- . ':(exclude)**/contrib/**' ':(exclude)third_party' ':(exclude)**.expect' | tools/trailing_newlines.py || (echo "The above files do not have correct trailing newlines; please normalize them"; false))
- name: Ensure no trailing spaces
run: |
(! git grep -I -no ' $' -- . ':(exclude)**/contrib/**' ':(exclude)third_party' || (echo "The above files have trailing spaces; please remove them"; false))
Expand Down
1 change: 0 additions & 1 deletion .jenkins/pytorch/perf_test/test_cpu_speed_torch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ test_cpu_speed_torch () {
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
run_test test_cpu_speed_torch "$@"
fi

1 change: 0 additions & 1 deletion .jenkins/pytorch/perf_test/test_cpu_speed_torch_tensor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ test_cpu_speed_torch_tensor () {
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
run_test test_cpu_speed_torch_tensor "$@"
fi

2 changes: 1 addition & 1 deletion android/test_app/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
android:background="@android:color/black"
android:textColor="@android:color/white" />

</FrameLayout>
</FrameLayout>
1 change: 0 additions & 1 deletion aten/src/ATen/NumericUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,3 @@ C10_HOST_DEVICE inline double tan<double>(double x) {
}

} // namespace at

1 change: 0 additions & 1 deletion aten/src/ATen/cpu/vec256/vsx/vec256_complex_double_vsx.h
Original file line number Diff line number Diff line change
Expand Up @@ -594,4 +594,3 @@ Vec256<ComplexDbl> inline minimum(
} // namespace
} // namespace vec256
} // namespace at

1 change: 0 additions & 1 deletion aten/src/ATen/cpu/vec256/vsx/vsx_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -386,4 +386,3 @@ const vfloat64 vd_pi_2 = vfloat64{M_PI / 2.0, 0.0};
} // namespace
} // namespace vec256
} // namespace at

1 change: 0 additions & 1 deletion aten/src/ATen/cudnn/cudnn-wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@

#undef STRINGIFY
#undef STRING

1 change: 0 additions & 1 deletion aten/src/ATen/div_rtn.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ static inline T div_rtn(T x, T y) {
if ((r!=0) && ((r<0) != (y<0))) --q;
return q;
}

1 change: 0 additions & 1 deletion aten/src/ATen/native/Cross.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ using cross_fn = void(*)(Tensor&, const Tensor&, const Tensor&, const int64_t d)
DECLARE_DISPATCH(cross_fn, cross_stub);

}} // namespace at::native

1 change: 0 additions & 1 deletion aten/src/ATen/native/batch_norm.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ DECLARE_DISPATCH(batch_norm_fn, batch_norm_cpu_inference_contiguous_stub);
} // namespace native

} // namespace at

1 change: 0 additions & 1 deletion aten/src/ATen/native/cpu/CrossKernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,3 @@ static void cross_kernel_impl(Tensor& result, const Tensor& a, const Tensor& b,
REGISTER_DISPATCH(cross_stub, &cross_kernel_impl);

}} // namespace at::native

1 change: 0 additions & 1 deletion aten/src/ATen/native/cuda/CrossKernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ void cross_kernel_impl(Tensor& result, const Tensor& x1, const Tensor& x2, const
REGISTER_DISPATCH(cross_stub, &cross_kernel_impl);

}}

2 changes: 1 addition & 1 deletion aten/src/ATen/native/cuda/EmbeddingBackwardKernel.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Tensor embedding_backward_cuda_kernel(
const Tensor &bag_size = Tensor(),
const Tensor &per_sample_weights = Tensor());

}}
}}
2 changes: 1 addition & 1 deletion aten/src/ATen/native/quantized/cpu/kernels/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
IS THE CASE CAN LEAD TO HARD-TO-DEBUG ODR VIOLATIONS.
- **Make sure different variants of the code (AVX, AVX2) are tested!**
There are build variants that do things like have NO AVX and NO AVX2 in
CI. Make sure they work!
CI. Make sure they work!
2 changes: 1 addition & 1 deletion aten/src/ATen/native/quantized/cpu/qnnpack/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ outlined on that page and do not file a public issue.

## License
By contributing to QNNPACK, you agree that your contributions will be licensed
under the LICENSE file in the root directory of this source tree.
under the LICENSE file in the root directory of this source tree.
2 changes: 0 additions & 2 deletions aten/src/ATen/test/NamedTensor_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,5 +233,3 @@ TEST(NamedTensorTest, TensorNamesCheckUnique) {
ASSERT_THROW(tensornames.checkUnique("op_name"), c10::Error);
}
}


1 change: 0 additions & 1 deletion aten/src/ATen/test/cuda_complex_math_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ __global__ void CUDA##a##b()
#define C10_DEFINE_TEST(a, b) TEST(a##Host, b)
#define C10_ASSERT_NEAR(a, b, tol) ASSERT_NEAR(a, b, tol)
#include <c10/test/util/complex_math_test_common.h>

1 change: 0 additions & 1 deletion aten/src/ATen/test/pow_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,4 +364,3 @@ TEST(PowTest, TestIntegralPow) {
test_inverse(longs);
test_inverse(ints);
}

1 change: 0 additions & 1 deletion aten/src/THC/generated/THCTensorMathCompareTBool.cu
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#include <THC/THCTensorMathCompareT.cuh>
#include <THC/THCTensor.hpp>

1 change: 0 additions & 1 deletion aten/src/THC/generated/THCTensorMathCompareTByte.cu
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#include <THC/THCTensorMathCompareT.cuh>
#include <THC/THCTensor.hpp>

1 change: 0 additions & 1 deletion aten/src/THC/generated/THCTensorMathCompareTChar.cu
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#include <THC/THCTensorMathCompareT.cuh>
#include <THC/THCTensor.hpp>

1 change: 0 additions & 1 deletion aten/src/THC/generated/THCTensorMathCompareTDouble.cu
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#include <THC/THCTensorMathCompareT.cuh>
#include <THC/THCTensor.hpp>

1 change: 0 additions & 1 deletion aten/src/THC/generated/THCTensorMathCompareTFloat.cu
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#include <THC/THCTensorMathCompareT.cuh>
#include <THC/THCTensor.hpp>

1 change: 0 additions & 1 deletion aten/src/THC/generated/THCTensorMathCompareTHalf.cu
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#include <THC/THCTensorMathCompareT.cuh>
#include <THC/THCTensor.hpp>

1 change: 0 additions & 1 deletion aten/src/THC/generated/THCTensorMathCompareTInt.cu
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#include <THC/THCTensorMathCompareT.cuh>
#include <THC/THCTensor.hpp>

1 change: 0 additions & 1 deletion aten/src/THC/generated/THCTensorMathCompareTLong.cu
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#include <THC/THCTensorMathCompareT.cuh>
#include <THC/THCTensor.hpp>

1 change: 0 additions & 1 deletion aten/src/THC/generated/THCTensorMathCompareTShort.cu
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#include <THC/THCTensorMathCompareT.cuh>
#include <THC/THCTensor.hpp>

1 change: 0 additions & 1 deletion benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ python -c "import torch; print(torch.__version__)"
Please refer to each subfolder to discover each benchmark suite

* [Fast RNNs benchmarks](fastrnns/README.md)

1 change: 0 additions & 1 deletion benchmarks/fastrnns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ you can also specify the models to generate nvprof files separately:

Use Linux for the most accurate timing. A lot of these tests only run
on CUDA.

2 changes: 1 addition & 1 deletion c10/util/Optional.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
#if (!defined(__CUDA_ARCH__) || !defined(CUDA_VERSION) || CUDA_VERSION > 9200)
static_assert(C10_IS_TRIVIALLY_COPYABLE(c10::optional<int>), "c10::optional<int> should be trivially copyable");
static_assert(C10_IS_TRIVIALLY_COPYABLE(c10::optional<bool>), "c10::optional<bool> should be trivially copyable");
#endif
#endif
2 changes: 1 addition & 1 deletion c10/util/Unicode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ std::string u16u8(const std::wstring& wstr) {
return str;
}
#endif
} // namespace c10
} // namespace c10
2 changes: 0 additions & 2 deletions caffe2/core/common_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,3 @@ TEST(CommonTest, TestStod) {
#endif // __ANDROID__

} // namespace caffe2


1 change: 0 additions & 1 deletion caffe2/core/nomnigraph/tests/AlgorithmsTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,3 @@ TEST(Subgraph, InduceEdgesCycle) {
EXPECT_TRUE(sg.hasEdge(edge));
}
}

1 change: 0 additions & 1 deletion caffe2/onnx/device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ Device::Device(const std::string &spec) {
device_id = atoi(spec.substr(pos + 1).c_str());
}
}}

1 change: 0 additions & 1 deletion caffe2/operators/roi_align_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -312,4 +312,3 @@ C10_EXPORT_CAFFE2_OP_TO_C10_CPU(
" bool aligned"
") -> Tensor",
caffe2::RoIAlignCPUOp<float>);

1 change: 0 additions & 1 deletion caffe2/opt/optimizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ NetDef optimize(NetDef net, int level) {

} // namespace opt
} // namespace caffe2

1 change: 0 additions & 1 deletion caffe2/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ prepend(Caffe2_HIP_PYTHON_SRCS ${CMAKE_CURRENT_SOURCE_DIR} ${Caffe2_HIP_PYTHON_S
set(Caffe2_CPU_PYTHON_SRCS ${Caffe2_CPU_PYTHON_SRCS} PARENT_SCOPE)
set(Caffe2_GPU_PYTHON_SRCS ${Caffe2_GPU_PYTHON_SRCS} PARENT_SCOPE)
set(Caffe2_HIP_PYTHON_SRCS ${Caffe2_HIP_PYTHON_SRCS} PARENT_SCOPE)

5 changes: 0 additions & 5 deletions caffe2/python/convert.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
## @package workspace
# Module caffe2.python.workspace





1 change: 0 additions & 1 deletion caffe2/python/fakelowp/init_shared_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
lib = os.environ['OSS_ONNXIFI_LIB']
print("Loading ONNXIFI lib: ".format(lib))
ctypes.CDLL(lib, ctypes.RTLD_GLOBAL)

1 change: 0 additions & 1 deletion caffe2/python/onnx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,3 @@ pip install -e caffe2/
# License

[MIT License](LICENSE)

1 change: 0 additions & 1 deletion caffe2/python/onnx/backend_cpp_rep.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@ def run(self, inputs):
# single input
output_values = self.__core.run([inputs])
return namedtupledict('Outputs', self.__external_outputs)(*output_values)

2 changes: 0 additions & 2 deletions caffe2/python/onnx/test_onnxifi.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,3 @@ def test_resnet50_core(self):
output_values = [workspace.FetchBlob(name) for name in net_outputs]
Y_trt = namedtupledict('Outputs', net_outputs)(*output_values)
np.testing.assert_allclose(Y_c2, Y_trt, rtol=1e-3)


4 changes: 0 additions & 4 deletions caffe2/python/onnx/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@




1 change: 0 additions & 1 deletion caffe2/python/onnx/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ def add_test_case(self, name, test_func):
if hasattr(self, name):
raise ValueError('Duplicated test name: {}'.format(name))
setattr(self, name, test_func)

1 change: 0 additions & 1 deletion caffe2/python/operator_test/mean_op_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,3 @@ def mean_ref(*args):

if __name__ == "__main__":
unittest.main()

5 changes: 0 additions & 5 deletions caffe2/python/rnn/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@





1 change: 0 additions & 1 deletion caffe2/python/serialized_test/SerializedTestCoverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -876,4 +876,3 @@ Serialized tests have covered 220/852 (25.8%) operators
* LengthsSumFakeFp16
* SparseLengthsMax
</details>

2 changes: 1 addition & 1 deletion caffe2/python/trt/data/class_labels.txt
Original file line number Diff line number Diff line change
Expand Up @@ -997,4 +997,4 @@ earthstar
hen-of-the-woods
bolete
ear
toilet tissue
toilet tissue
2 changes: 0 additions & 2 deletions caffe2/python/trt/test_trt.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,5 +277,3 @@ def test_resnet50_core(self):
output_values = [workspace.FetchBlob(name) for name in net_outputs]
Y_trt = namedtupledict('Outputs', net_outputs)(*output_values)
np.testing.assert_allclose(Y_c2, Y_trt, rtol=1e-3)


1 change: 0 additions & 1 deletion caffe2/python/trt/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,3 @@ def transform_caffe2_net(
pred_net_cut = caffe2_pb2.NetDef()
pred_net_cut.ParseFromString(pred_net_str)
return pred_net_cut

2 changes: 0 additions & 2 deletions caffe2/utils/simple_queue_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,3 @@ TEST(SimpleQueueDeathTest, CannotAddAfterQueueFinished) {


} // namespace caffe2


1 change: 0 additions & 1 deletion cmake/Modules/FindAtlas.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@ if(ATLAS_FOUND)

message(STATUS "Found Atlas (include: ${Atlas_CBLAS_INCLUDE_DIR}, library: ${Atlas_BLAS_LIBRARY})")
endif(ATLAS_FOUND)

1 change: 0 additions & 1 deletion cmake/Modules/FindHiredis.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ if(HIREDIS_FOUND)
message(STATUS "Found Hiredis (include: ${Hiredis_INCLUDE_DIR}, library: ${Hiredis_LIBRARIES})")
mark_as_advanced(Hiredis_INCLUDE_DIR Hiredis_LIBRARIES)
endif()

1 change: 0 additions & 1 deletion cmake/Modules/FindNumPy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,3 @@ if(NUMPY_FOUND)
endif()

caffe_clear_vars(__result __output __error_value __values __ver_check __error_value)

1 change: 0 additions & 1 deletion cmake/Modules/FindNuma.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ if(NUMA_FOUND)
"Found Numa (include: ${Numa_INCLUDE_DIR}, library: ${Numa_LIBRARIES})")
mark_as_advanced(Numa_INCLUDE_DIR Numa_LIBRARIES)
endif()

1 change: 0 additions & 1 deletion cmake/Modules/FindOpenBLAS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ MARK_AS_ADVANCED(
OpenBLAS_LIB
OpenBLAS
)

1 change: 0 additions & 1 deletion cmake/Modules/FindRocksDB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ if(ROCKSDB_FOUND)
message(STATUS "Found RocksDB (include: ${RocksDB_INCLUDE_DIR}, library: ${RocksDB_LIBRARIES})")
mark_as_advanced(RocksDB_INCLUDE_DIR RocksDB_LIBRARIES)
endif()

1 change: 0 additions & 1 deletion cmake/Modules/FindSnappy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ if(SNAPPY_FOUND)
SNAPPY_VERION_LINES SNAPPY_MAJOR SNAPPY_MINOR SNAPPY_PATCHLEVEL)
set(Snappy_VERSION "${SNAPPY_MAJOR}.${SNAPPY_MINOR}.${SNAPPY_PATCHLEVEL}")
endif()

1 change: 0 additions & 1 deletion cmake/Modules/FindVSX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
endif()
message("-- </FindVSX>")
endif()

2 changes: 0 additions & 2 deletions cmake/Modules_CUDA_fix/upstream/FindCUDA/parse_cubin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,3 @@ if (NOT "${file_text}" STREQUAL "")
else()
# message("FOUND NO DEPENDS")
endif()


1 change: 0 additions & 1 deletion cmake/public/gflags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,3 @@ if(NOT TARGET gflags)
"Caffe2 or a Caffe2 dependent library, the next warning / error will "
"give you more info.")
endif()

1 change: 0 additions & 1 deletion cmake/public/glog.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,3 @@ if(NOT TARGET glog::glog)
"Caffe2 or a Caffe2 dependent library, the next warning / error will "
"give you more info.")
endif()

1 change: 0 additions & 1 deletion cmake/public/utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -484,4 +484,3 @@ function(torch_set_target_props libname)
set_target_properties(${libname} PROPERTIES STATIC_LIBRARY_FLAGS_DEBUG "/NODEFAULTLIB:${VCOMP_LIB}d")
endif()
endfunction()

1 change: 0 additions & 1 deletion docs/caffe2/DOXYGEN.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@ def my_method(x, y):"""!
```

Note that the bang (!) is added after the opening comment """! - this seems to do the trick and the remaining comments will be nicely parsed by Doxygen.

1 change: 0 additions & 1 deletion docs/cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ clean:
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

3 changes: 0 additions & 3 deletions docs/source/community/persons_of_interest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,3 @@ TorchAudio
~~~~~~~~~~

- Vincent QB (`vincentqb <https://github.com/vincentqb>`__)



1 change: 0 additions & 1 deletion docs/source/dlpack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ torch.utils.dlpack

.. autofunction:: from_dlpack
.. autofunction:: to_dlpack

1 change: 0 additions & 1 deletion docs/source/jit_builtin_functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ This is a full reference of functions and Tensor methods accessible in TorchScri
.. contents:: :local:

.. automodule:: torch.jit.supported_ops

2 changes: 1 addition & 1 deletion docs/source/notes/cpu_threading_torchscript_inference.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions docs/source/notes/randomness.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,3 @@ Use :meth:`worker_init_fn` to preserve reproducibility::
num_workers=num_workers,
worker_init_fn=seed_worker
)


2 changes: 1 addition & 1 deletion docs/source/special.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Functions
.. autofunction:: erfinv
.. autofunction:: expm1
.. autofunction:: exp2
.. autofunction:: gammaln
.. autofunction:: gammaln
1 change: 0 additions & 1 deletion docs/source/storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,3 @@ Every :class:`torch.Tensor` has a corresponding storage of the same data type.
:members:
:undoc-members:
:inherited-members:

Loading

0 comments on commit 5bcbbf5

Please sign in to comment.