mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01: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:
parent
9a45001905
commit
3aa512cd72
|
|
@ -187,9 +187,12 @@ command = [
|
||||||
code = 'CLANGTIDY'
|
code = 'CLANGTIDY'
|
||||||
include_patterns = [
|
include_patterns = [
|
||||||
'aten/src/ATen/core/*.cpp',
|
'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/**/*.cpp',
|
||||||
'c10/**/*.h',
|
'c10/**/*.h',
|
||||||
# Enable coverage of headers in torch/csrc and excluding sub-directories for now.
|
|
||||||
'torch/csrc/*.h',
|
'torch/csrc/*.h',
|
||||||
'torch/csrc/*.cpp',
|
'torch/csrc/*.cpp',
|
||||||
'torch/csrc/**/*.h',
|
'torch/csrc/**/*.h',
|
||||||
|
|
|
||||||
|
|
@ -607,7 +607,7 @@ void* RefcountedMapAllocator::data() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
MapAllocator::~MapAllocator() {
|
MapAllocator::~MapAllocator() {
|
||||||
close();
|
MapAllocator::close();
|
||||||
c10::reportMemoryUsageToProfiler(base_ptr_, -size_, 0, 0, c10::Device(c10::DeviceType::CPU));
|
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;
|
void close() override;
|
||||||
|
|
||||||
~RefcountedMapAllocator() override {
|
~RefcountedMapAllocator() override {
|
||||||
close();
|
RefcountedMapAllocator::close();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user