mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[2/N] Fix clang-tidy readability checks (#164652)
This PR applies clang-tidy readability checks to jit sources and all headers in the code base. `readability-redundant-inline-specifier` is suppressed because it incurs too many changes. `readability-redundant-inline-specifier` is used to detect redundant inline specifiers on function and variable declarations. There are many in-class method definitions that are marked inline. Pull Request resolved: https://github.com/pytorch/pytorch/pull/164652 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
331191ce4b
commit
9fff8155c3
@ -182,7 +182,7 @@ class OptionalDeviceGuard {
|
||||
}
|
||||
|
||||
private:
|
||||
impl::InlineOptionalDeviceGuard<impl::VirtualGuardImpl> guard_{};
|
||||
impl::InlineOptionalDeviceGuard<impl::VirtualGuardImpl> guard_;
|
||||
};
|
||||
|
||||
// Note [Whither the DeviceGuard boilerplate]
|
||||
|
@ -143,7 +143,7 @@ struct OptionalStreamGuard {
|
||||
}
|
||||
|
||||
private:
|
||||
c10::impl::InlineOptionalStreamGuard<impl::VirtualGuardImpl> guard_{};
|
||||
c10::impl::InlineOptionalStreamGuard<impl::VirtualGuardImpl> guard_;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -34,6 +34,7 @@ C10_DECLARE_REGISTRY(
|
||||
// Get the global PyInterpreter hooks instance
|
||||
C10_API const PyInterpreterHooksInterface& getPyInterpreterHooks();
|
||||
|
||||
// Helper function to get the global interpreter
|
||||
C10_API PyInterpreter* getGlobalPyInterpreter();
|
||||
|
||||
} // namespace c10::impl
|
||||
|
@ -137,7 +137,7 @@ struct TraceEntry {
|
||||
size_t size_;
|
||||
MempoolId_t mempool_;
|
||||
trace_time_ time_{};
|
||||
std::string compile_context_{};
|
||||
std::string compile_context_;
|
||||
};
|
||||
|
||||
// Calls made by record_function will save annotations
|
||||
|
Reference in New Issue
Block a user