Refine the sources in utils directory
Created by: gangliao
Currently, paddle/utils
includes miscellaneous, irrelevant source code, which should be deleted or moved to other places.
For instance, dependency relationships:
[utils <- cuda], [cuda <- utils]
initMain()
in utils
dir depends on hl_start()
in cuda
dir, and vice versa .
After discussing with @reyoung @wangkuiyi, we reached a preliminary consensus to revise sources.
- ├── BarrierStat.cpp
- ├── BarrierStat.h
- ├── CMakeLists.txt
- ├── ClassRegistrar.h
- ├── CommandLineParser.cpp #989 @gangliao
- ├── CommandLineParser.h #989 @gangliao
-
├── CpuId.cpp
runtime check flags for AVX
@gangliao - ├── CpuId.h @gangliao
- ├── CustomStackTrace.cpp
- ├── CustomStackTrace.h
- ├── DisableCopy.h #994 move into common.h @gangliao
-
├── Excepts.cpp
mac_os_x
#1075 @gangliao - ├── Excepts.h @gangliao
- ├── Flags.cpp #852 (closed) @reyoung
-
├── Flags.h @reyoung
all global flags definitions, need to be removed.
-
├── GlobalConstants.cpp
we do new API implementation. PassType -> Trainer.h,
-
├── GlobalConstants.h
ParameterType -> Parameter.h
-
├── Locks.h
some locks can be removed.
-
├── Logging.cpp
use gflags.h, Keep debug logging level
- ├── Logging.h
-
├── PythonUtil.cpp
/paddle/python
- ├── PythonUtil.h
-
├── Queue.h
ThreadSafeQueue.h
-
├── Stat.cpp
move registerTimer to paddle/stats
- ├── Stat.h
- ├── StringUtil.cpp
- ├── StringUtil.h
-
├── Thread.h
delete if not necessary
-
├── ThreadLocal.cpp
seems necessary, how about c++11 thread library?
- ├── ThreadLocal.h
-
├── TypeDefs.h
FloatType.h
#994 move into common.h @gangliao - ├── Util.cpp
-
├── Util.h
split into several pieces
-
├── Version.cpp
delete or split
- ├── Version.h ├── arch │ ├── linux │ │ └── Locks.cpp │ └── osx │ └── Locks.cpp ├── enable_virtualenv.c ├── enable_virtualenv.py └── tests