mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
adjust header inclusions in C10 as sugguested by IWYU (#102467)
This PR aims to reduce unused header inclusions in C10. Pull Request resolved: https://github.com/pytorch/pytorch/pull/102467 Approved by: https://github.com/albanD
This commit is contained in:
parent
0ecca122e7
commit
3ae42cb7db
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <c10/core/DeviceType.h>
|
||||
#include <c10/macros/Export.h>
|
||||
#include <cstdint>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include <c10/core/StorageImpl.h>
|
||||
#include <c10/util/flat_hash_map.h>
|
||||
|
||||
namespace c10 {
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
#include <c10/core/SymInt.h>
|
||||
#include <c10/core/impl/PyObjectSlot.h>
|
||||
|
||||
#include <c10/util/Optional.h>
|
||||
#include <c10/util/flat_hash_map.h>
|
||||
#include <c10/util/intrusive_ptr.h>
|
||||
|
||||
namespace c10 {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
#include <c10/core/impl/LocalDispatchKeySet.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace c10 {
|
||||
namespace impl {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <c10/core/DispatchKeySet.h>
|
||||
#include <c10/macros/Macros.h>
|
||||
#include <c10/util/Flags.h>
|
||||
#include <c10/macros/Export.h>
|
||||
|
||||
// TLS management for DispatchKeySet (the "local" DispatchKeySet(s))
|
||||
//
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <c10/core/impl/cow/deleter.h>
|
||||
#include <c10/util/Exception.h>
|
||||
#include <mutex>
|
||||
|
||||
namespace c10::impl {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#include <c10/macros/Macros.h>
|
||||
#include <c10/macros/Export.h>
|
||||
#include <c10/util/UniqueVoidPtr.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <shared_mutex>
|
||||
#include <variant>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <c10/macros/Macros.h>
|
||||
#include <c10/macros/Export.h>
|
||||
|
||||
namespace c10 {
|
||||
namespace impl {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include <c10/mobile/CPUCachingAllocator.h>
|
||||
|
||||
#include <c10/core/impl/alloc_cpu.h>
|
||||
#include <c10/mobile/CPUCachingAllocator.h>
|
||||
#include <c10/util/Exception.h>
|
||||
|
||||
namespace c10 {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <deque>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
#include <c10/util/Exception.h>
|
||||
#include <c10/util/SmallVector.h>
|
||||
#include <c10/util/flat_hash_map.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
#include <c10/util/Flags.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <c10/macros/Macros.h>
|
||||
|
||||
#ifdef C10_USE_GFLAGS
|
||||
|
||||
#include <c10/util/Flags.h>
|
||||
#include <string>
|
||||
|
||||
namespace c10 {
|
||||
|
||||
using std::string;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,16 @@
|
|||
#include <c10/util/Backtrace.h>
|
||||
#include <c10/util/Logging.h>
|
||||
#include <c10/util/signal_handler.h>
|
||||
|
||||
#if defined(C10_SUPPORTS_SIGNAL_HANDLER)
|
||||
|
||||
// Normal signal handler implementation.
|
||||
#include <cxxabi.h>
|
||||
#include <dirent.h>
|
||||
#include <dlfcn.h>
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/core.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <unwind.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include <mutex>
|
||||
|
||||
#include <c10/macros/Export.h>
|
||||
#include <c10/util/Logging.h>
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#define C10_SUPPORTS_SIGNAL_HANDLER
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user