Created by: jiweibo
-
cmake选项中添加了WITH_NCCL,显示指定是否编译NCCL的部分代码,WITH_NCCL默认打开,但如果WITH_GPU为OFF,则关闭WITH_NCCL
-
添加了PADDLE_WITH_NCCL定义
-
将以下文件中的defined(PADDLE_WITH_CUDA) && !defined(WIN32)宏改成了defined(PADDLE_WITH_NCCL)。之前的方式无法控制涉及nccl部分代码的编译,改成PADDLE_WITH_NCCL后可以从cmake选项中显示控制nccl部分代码是否编译
- details/all_reduce_op_handle.cc
- details/all_reduce_op_handle.h
- details/broadcast_op_handle.cc
- details/broadcast_op_handle.h
- details/broadcast_op_handle_test.h
- details/fused_all_reduce_op_handle.cc
- details/fused_all_reduce_op_handle.h
- details/fused_broadcast_op_handle.h
- details/fused_broadcast_op_handle_test.cc
- details/reduce_op_handle.cc
- details/reduce_op_handle.h
- framework/device_worker_factory.cc
- framework/ir/multi_devices_graph_pass/all_reduce_deps_pass.cc
- framework/ir/multi_devices_graph_pass/fuse_all_reduce_op_pass.cc
- framework/ir/multi_devices_graph_pass/multi_devices_graph_pass.cc
- framework/ir/multi_devices_graph_pass/multi_devices_graph_pass.h
- framework/parallel_executor.cc
- framework/parallel_executor.h
- framework/pipeline_trainer.cc
- framework/section_worker.cc
- framework/trainer_factory.cc
- imperative/nccl_context.cc
- imperative/nccl_context.h
- operators/data_norm_op.cu
- platform/device_context.cc
- platform/device_context.h
- platform/enforce_test.cc
- pybind/imperative.cc
- pybind/pybind.cc
单机单卡能够关闭NCCL编译,多卡的话需要默认打开NCCL,如果关闭NCCL,则只能使用单卡。