mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[Clang-tidy header][23/N] Enable clang-tidy coverage on aten/src/ATen/*.{cpp,h} (#121380)
This PR finishes the works beginning with #https://github.com/pytorch/pytorch/pull/120763 by enabling clang-tidy on aten/src/ATen. Pull Request resolved: https://github.com/pytorch/pytorch/pull/121380 Approved by: https://github.com/Skylion007
This commit is contained in:
@ -187,9 +187,12 @@ command = [
|
||||
code = 'CLANGTIDY'
|
||||
include_patterns = [
|
||||
'aten/src/ATen/core/*.cpp',
|
||||
# Enable coverage of headers in aten/src/ATen
|
||||
# and excluding most sub-directories for now.
|
||||
'aten/src/ATen/*.h',
|
||||
'aten/src/ATen/*.cpp',
|
||||
'c10/**/*.cpp',
|
||||
'c10/**/*.h',
|
||||
# Enable coverage of headers in torch/csrc and excluding sub-directories for now.
|
||||
'torch/csrc/*.h',
|
||||
'torch/csrc/*.cpp',
|
||||
'torch/csrc/**/*.h',
|
||||
|
@ -607,7 +607,7 @@ void* RefcountedMapAllocator::data() const {
|
||||
}
|
||||
|
||||
MapAllocator::~MapAllocator() {
|
||||
close();
|
||||
MapAllocator::close();
|
||||
c10::reportMemoryUsageToProfiler(base_ptr_, -size_, 0, 0, c10::Device(c10::DeviceType::CPU));
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ class TORCH_API RefcountedMapAllocator : private RefcountedMapAllocatorArgCheck,
|
||||
void close() override;
|
||||
|
||||
~RefcountedMapAllocator() override {
|
||||
close();
|
||||
RefcountedMapAllocator::close();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
Reference in New Issue
Block a user