diff --git a/projects/rccl/CMakeLists.txt b/projects/rccl/CMakeLists.txt index 237e9242b3..a69a7b3892 100644 --- a/projects/rccl/CMakeLists.txt +++ b/projects/rccl/CMakeLists.txt @@ -111,20 +111,11 @@ foreach(filename ${CU_SOURCES}) list(APPEND CPP_SOURCES ${cpp_filename}) endforeach(filename) -list(APPEND CPP_SOURCES src/collectives/device/all_gather_0.cpp) -list(APPEND CPP_SOURCES src/collectives/device/all_reduce_0.cpp) -list(APPEND CPP_SOURCES src/collectives/device/all_reduce_1.cpp) -list(APPEND CPP_SOURCES src/collectives/device/all_reduce_2.cpp) -list(APPEND CPP_SOURCES src/collectives/device/all_reduce_3.cpp) -list(APPEND CPP_SOURCES src/collectives/device/broadcast_0.cpp) -list(APPEND CPP_SOURCES src/collectives/device/reduce_0.cpp) -list(APPEND CPP_SOURCES src/collectives/device/reduce_1.cpp) -list(APPEND CPP_SOURCES src/collectives/device/reduce_2.cpp) -list(APPEND CPP_SOURCES src/collectives/device/reduce_3.cpp) -list(APPEND CPP_SOURCES src/collectives/device/reduce_scatter_0.cpp) -list(APPEND CPP_SOURCES src/collectives/device/reduce_scatter_1.cpp) -list(APPEND CPP_SOURCES src/collectives/device/reduce_scatter_2.cpp) -list(APPEND CPP_SOURCES src/collectives/device/reduce_scatter_3.cpp) +list(APPEND CPP_SOURCES src/collectives/device/all_gather_dev.cpp) +list(APPEND CPP_SOURCES src/collectives/device/all_reduce_dev.cpp) +list(APPEND CPP_SOURCES src/collectives/device/broadcast_dev.cpp) +list(APPEND CPP_SOURCES src/collectives/device/reduce_dev.cpp) +list(APPEND CPP_SOURCES src/collectives/device/reduce_scatter_dev.cpp) add_library(rccl ${CPP_SOURCES}) diff --git a/projects/rccl/src/collectives/device/all_gather_0.cpp b/projects/rccl/src/collectives/device/all_gather_0.cpp deleted file mode 100644 index 75f90ca5e6..0000000000 --- a/projects/rccl/src/collectives/device/all_gather_0.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/************************************************************************* - * Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. - * - * See LICENSE.txt for license information - ************************************************************************/ - -#define NCCL_OP 0 -#include "device/all_gather.cu" diff --git a/projects/rccl/src/collectives/device/all_gather.cu b/projects/rccl/src/collectives/device/all_gather_dev.cpp similarity index 83% rename from projects/rccl/src/collectives/device/all_gather.cu rename to projects/rccl/src/collectives/device/all_gather_dev.cpp index 0f572ce7cb..3fd3e0c63e 100644 --- a/projects/rccl/src/collectives/device/all_gather.cu +++ b/projects/rccl/src/collectives/device/all_gather_dev.cpp @@ -1,5 +1,6 @@ /************************************************************************* * Copyright (c) 2015-2018, NVIDIA CORPORATION. All rights reserved. + * Modifications Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. * * See LICENSE.txt for license information ************************************************************************/ @@ -10,6 +11,4 @@ #define UNROLL 4 -#if NCCL_OP == 0 IMPL_COLL3(ncclAllGather, copy, FuncSum, i8, int8_t, ncclCollAllGather, ncclSum, ncclInt8); -#endif diff --git a/projects/rccl/src/collectives/device/all_reduce_0.cpp b/projects/rccl/src/collectives/device/all_reduce_0.cpp deleted file mode 100644 index 235005af1a..0000000000 --- a/projects/rccl/src/collectives/device/all_reduce_0.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/************************************************************************* - * Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. - * - * See LICENSE.txt for license information - ************************************************************************/ - -#define NCCL_OP 0 -#include "device/all_reduce.cu" diff --git a/projects/rccl/src/collectives/device/all_reduce_1.cpp b/projects/rccl/src/collectives/device/all_reduce_1.cpp deleted file mode 100644 index dda4b5d517..0000000000 --- a/projects/rccl/src/collectives/device/all_reduce_1.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/************************************************************************* - * Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. - * - * See LICENSE.txt for license information - ************************************************************************/ - -#define NCCL_OP 1 -#include "device/all_reduce.cu" diff --git a/projects/rccl/src/collectives/device/all_reduce_2.cpp b/projects/rccl/src/collectives/device/all_reduce_2.cpp deleted file mode 100644 index 745435b60f..0000000000 --- a/projects/rccl/src/collectives/device/all_reduce_2.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/************************************************************************* - * Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. - * - * See LICENSE.txt for license information - ************************************************************************/ - -#define NCCL_OP 2 -#include "device/all_reduce.cu" diff --git a/projects/rccl/src/collectives/device/all_reduce_3.cpp b/projects/rccl/src/collectives/device/all_reduce_3.cpp deleted file mode 100644 index d7f45f03dd..0000000000 --- a/projects/rccl/src/collectives/device/all_reduce_3.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/************************************************************************* - * Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. - * - * See LICENSE.txt for license information - ************************************************************************/ - -#define NCCL_OP 3 -#include "device/all_reduce.cu" diff --git a/projects/rccl/src/collectives/device/all_reduce.cu b/projects/rccl/src/collectives/device/all_reduce_dev.cpp similarity index 88% rename from projects/rccl/src/collectives/device/all_reduce.cu rename to projects/rccl/src/collectives/device/all_reduce_dev.cpp index caa1479c12..1671af17ae 100644 --- a/projects/rccl/src/collectives/device/all_reduce.cu +++ b/projects/rccl/src/collectives/device/all_reduce_dev.cpp @@ -1,5 +1,6 @@ /************************************************************************* * Copyright (c) 2015-2018, NVIDIA CORPORATION. All rights reserved. + * Modifications Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. * * See LICENSE.txt for license information ************************************************************************/ @@ -10,12 +11,7 @@ #define UNROLL 4 -#if NCCL_OP == 0 IMPL_COLL2(ncclAllReduce, sum, FuncSum, ncclCollAllReduce, ncclSum); -#elif NCCL_OP == 1 IMPL_COLL2(ncclAllReduce, prod, FuncProd, ncclCollAllReduce, ncclProd); -#elif NCCL_OP == 2 IMPL_COLL2(ncclAllReduce, min, FuncMin, ncclCollAllReduce, ncclMin); -#elif NCCL_OP == 3 IMPL_COLL2(ncclAllReduce, max, FuncMax, ncclCollAllReduce, ncclMax); -#endif diff --git a/projects/rccl/src/collectives/device/broadcast_0.cpp b/projects/rccl/src/collectives/device/broadcast_0.cpp deleted file mode 100644 index 75b75ad9cf..0000000000 --- a/projects/rccl/src/collectives/device/broadcast_0.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/************************************************************************* - * Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. - * - * See LICENSE.txt for license information - ************************************************************************/ - -#define NCCL_OP 0 -#include "device/broadcast.cu" diff --git a/projects/rccl/src/collectives/device/broadcast.cu b/projects/rccl/src/collectives/device/broadcast_dev.cpp similarity index 83% rename from projects/rccl/src/collectives/device/broadcast.cu rename to projects/rccl/src/collectives/device/broadcast_dev.cpp index 4125de41f9..0e90ac1f23 100644 --- a/projects/rccl/src/collectives/device/broadcast.cu +++ b/projects/rccl/src/collectives/device/broadcast_dev.cpp @@ -1,5 +1,6 @@ /************************************************************************* * Copyright (c) 2015-2018, NVIDIA CORPORATION. All rights reserved. + * Modifications Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. * * See LICENSE.txt for license information ************************************************************************/ @@ -10,6 +11,4 @@ #define UNROLL 4 -#if NCCL_OP == 0 IMPL_COLL3(ncclBroadcast, copy, FuncSum, i8, int8_t, ncclCollBroadcast, ncclSum, ncclInt8); -#endif diff --git a/projects/rccl/src/collectives/device/reduce_0.cpp b/projects/rccl/src/collectives/device/reduce_0.cpp deleted file mode 100644 index f1b83bc655..0000000000 --- a/projects/rccl/src/collectives/device/reduce_0.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/************************************************************************* - * Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. - * - * See LICENSE.txt for license information - ************************************************************************/ - -#define NCCL_OP 0 -#include "device/reduce.cu" diff --git a/projects/rccl/src/collectives/device/reduce_1.cpp b/projects/rccl/src/collectives/device/reduce_1.cpp deleted file mode 100644 index 63b157075e..0000000000 --- a/projects/rccl/src/collectives/device/reduce_1.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/************************************************************************* - * Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. - * - * See LICENSE.txt for license information - ************************************************************************/ - -#define NCCL_OP 1 -#include "device/reduce.cu" diff --git a/projects/rccl/src/collectives/device/reduce_2.cpp b/projects/rccl/src/collectives/device/reduce_2.cpp deleted file mode 100644 index 7c84b0ada3..0000000000 --- a/projects/rccl/src/collectives/device/reduce_2.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/************************************************************************* - * Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. - * - * See LICENSE.txt for license information - ************************************************************************/ - -#define NCCL_OP 2 -#include "device/reduce.cu" diff --git a/projects/rccl/src/collectives/device/reduce_3.cpp b/projects/rccl/src/collectives/device/reduce_3.cpp deleted file mode 100644 index c590bdd3c6..0000000000 --- a/projects/rccl/src/collectives/device/reduce_3.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/************************************************************************* - * Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. - * - * See LICENSE.txt for license information - ************************************************************************/ - -#define NCCL_OP 3 -#include "device/reduce.cu" diff --git a/projects/rccl/src/collectives/device/reduce.cu b/projects/rccl/src/collectives/device/reduce_dev.cpp similarity index 87% rename from projects/rccl/src/collectives/device/reduce.cu rename to projects/rccl/src/collectives/device/reduce_dev.cpp index bd1d23ce79..dbfa1b7fad 100644 --- a/projects/rccl/src/collectives/device/reduce.cu +++ b/projects/rccl/src/collectives/device/reduce_dev.cpp @@ -1,5 +1,6 @@ /************************************************************************* * Copyright (c) 2015-2018, NVIDIA CORPORATION. All rights reserved. + * Modifications Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. * * See LICENSE.txt for license information ************************************************************************/ @@ -10,12 +11,7 @@ #define UNROLL 4 -#if NCCL_OP == 0 IMPL_COLL2(ncclReduce, sum, FuncSum, ncclCollReduce, ncclSum); -#elif NCCL_OP == 1 IMPL_COLL2(ncclReduce, prod, FuncProd, ncclCollReduce, ncclProd); -#elif NCCL_OP == 2 IMPL_COLL2(ncclReduce, min, FuncMin, ncclCollReduce, ncclMin); -#elif NCCL_OP == 3 IMPL_COLL2(ncclReduce, max, FuncMax, ncclCollReduce, ncclMax); -#endif diff --git a/projects/rccl/src/collectives/device/reduce_scatter_0.cpp b/projects/rccl/src/collectives/device/reduce_scatter_0.cpp deleted file mode 100644 index 936f164605..0000000000 --- a/projects/rccl/src/collectives/device/reduce_scatter_0.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/************************************************************************* - * Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. - * - * See LICENSE.txt for license information - ************************************************************************/ - -#define NCCL_OP 0 -#include "device/reduce_scatter.cu" diff --git a/projects/rccl/src/collectives/device/reduce_scatter_1.cpp b/projects/rccl/src/collectives/device/reduce_scatter_1.cpp deleted file mode 100644 index 3dbd2466d7..0000000000 --- a/projects/rccl/src/collectives/device/reduce_scatter_1.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/************************************************************************* - * Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. - * - * See LICENSE.txt for license information - ************************************************************************/ - -#define NCCL_OP 1 -#include "device/reduce_scatter.cu" diff --git a/projects/rccl/src/collectives/device/reduce_scatter_2.cpp b/projects/rccl/src/collectives/device/reduce_scatter_2.cpp deleted file mode 100644 index 7302f55739..0000000000 --- a/projects/rccl/src/collectives/device/reduce_scatter_2.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/************************************************************************* - * Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. - * - * See LICENSE.txt for license information - ************************************************************************/ - -#define NCCL_OP 2 -#include "device/reduce_scatter.cu" diff --git a/projects/rccl/src/collectives/device/reduce_scatter_3.cpp b/projects/rccl/src/collectives/device/reduce_scatter_3.cpp deleted file mode 100644 index 95a2fc93b7..0000000000 --- a/projects/rccl/src/collectives/device/reduce_scatter_3.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/************************************************************************* - * Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. - * - * See LICENSE.txt for license information - ************************************************************************/ - -#define NCCL_OP 3 -#include "device/reduce_scatter.cu" diff --git a/projects/rccl/src/collectives/device/reduce_scatter.cu b/projects/rccl/src/collectives/device/reduce_scatter_dev.cpp similarity index 90% rename from projects/rccl/src/collectives/device/reduce_scatter.cu rename to projects/rccl/src/collectives/device/reduce_scatter_dev.cpp index efff65deba..ba287e305e 100644 --- a/projects/rccl/src/collectives/device/reduce_scatter.cu +++ b/projects/rccl/src/collectives/device/reduce_scatter_dev.cpp @@ -11,12 +11,7 @@ #define UNROLL 4 -#if NCCL_OP == 0 IMPL_COLL2(ncclReduceScatter, sum, FuncSum, ncclCollReduceScatter, ncclSum); -#elif NCCL_OP == 1 IMPL_COLL2(ncclReduceScatter, prod, FuncProd, ncclCollReduceScatter, ncclProd); -#elif NCCL_OP == 2 IMPL_COLL2(ncclReduceScatter, min, FuncMin, ncclCollReduceScatter, ncclMin); -#elif NCCL_OP == 3 IMPL_COLL2(ncclReduceScatter, max, FuncMax, ncclCollReduceScatter, ncclMax); -#endif