Skip to content

Commit

Permalink
Merge pull request #47 from wenkaidu/move_header_file
Browse files Browse the repository at this point in the history
move rccl.h to inc folder to be consistent with other ROCm libs
  • Loading branch information
wenkaidu authored Nov 9, 2018
2 parents 2560190 + 80413e2 commit 9c7b2e3
Show file tree
Hide file tree
Showing 22 changed files with 25 additions and 26 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ include(ROCMInstallSymlinks)
include(ROCMCreatePackage)

rocm_setup_version(
VERSION 0.7.0
VERSION 0.7.1
)

list(APPEND CMAKE_PREFIX_PATH /opt/rocm /opt/rocm/hip /opt/rocm/hcc)
Expand All @@ -51,7 +51,7 @@ link_libraries(-amdgpu-target=gfx803 -amdgpu-target=gfx900 -amdgpu-target=gfx906
option( BUILD_SHARED_LIBS "Build as a shared library" ON )

# configure a header file to pass the CMake version settings to the source, and package the header files in the output archive
configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/inc/rccl/rccl-version.h.in" "${PROJECT_BINARY_DIR}/inc/rccl/rccl-version.h" )
configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/inc/rccl-version.h.in" "${PROJECT_BINARY_DIR}/inc/rccl-version.h" )

add_library( rccl
src/rccl.cpp
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export LD_LIBRARY_PATH=/opt/rocm/rccl/lib:$LD_LIBRARY_PATH

## Usage
```cpp
#include <rccl/rccl.h>
#include <rccl.h>
#include <vector>

int main() {
Expand Down
File renamed without changes.
File renamed without changes.
11 changes: 5 additions & 6 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SRC=rccl.cpp rcclAllReduce.cpp rcclBcast.cpp rcclReduce.cpp rcclTracker.cpp rccl

all: lib

../inc/rccl/rccl-version.h: ../inc/rccl/rccl-version.h.in
../inc/rccl-version.h: ../inc/rccl-version.h.in
gitver=`git log -1 --pretty='%h'`; \
string=`cat ../CMakeLists.txt`; \
re=' VERSION.([0-9]*)\.([0-9]*)\.([0-9]*).'; \
Expand All @@ -20,21 +20,20 @@ all: lib
$< > $@; \
fi

lib: ../inc/rccl/rccl-version.h
lib: ../inc/rccl-version.h
${HCC_DIR}/bin/hcc -I../inc ${TARGETS} -I${HIP_DIR}/include -I${HSA_DIR}/include/ `${HCC_DIR}/bin/hcc-config --shared --cxxflags --ldflags` -L${HIP_DIR}/lib -lhip_hcc $(SRC) -o librccl.so

install:
mkdir -p $(RCCL_INSTALL_DIR)
mkdir -p $(RCCL_INSTALL_DIR)/include
mkdir -p $(RCCL_INSTALL_DIR)/include/rccl
mkdir -p $(RCCL_INSTALL_DIR)/lib
cp librccl.so $(RCCL_INSTALL_DIR)/lib
cp ../inc/rccl/rccl.h $(RCCL_INSTALL_DIR)/include/rccl
cp ../inc/rccl/rccl-version.h $(RCCL_INSTALL_DIR)/include/rccl
cp ../inc/rccl.h $(RCCL_INSTALL_DIR)/include
cp ../inc/rccl-version.h $(RCCL_INSTALL_DIR)/include

clean:
rm -rf librccl.so
rm ../inc/rccl/rccl-version.h
rm ../inc/rccl-version.h

uninstall:
rm -rf $(RCCL_INSTALL_DIR)
2 changes: 1 addition & 1 deletion src/rccl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ All rights reserved.

#include "rcclHelper.h"
#include "rcclTracker.h"
#include "rccl/rccl-version.h"
#include "rccl-version.h"

#include <string>
#include <unordered_map>
Expand Down
2 changes: 1 addition & 1 deletion src/rcclCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ All rights reserved.
#pragma once

#include <iostream>
#include "rccl/rccl.h"
#include "rccl.h"

#define HIPCHECK(status) \
if (status != hipSuccess) { \
Expand Down
2 changes: 1 addition & 1 deletion tests/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ All rights reserved.
#include <unordered_map>
#include <vector>

#include "rccl/rccl.h"
#include "rccl.h"

#define HIPCHECK(status) \
if (status != hipSuccess) { \
Expand Down
2 changes: 1 addition & 1 deletion tests/conformance/rcclCommInitAll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All rights reserved.

#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime.h>
#include "rccl/rccl.h"
#include "rccl.h"
#include "common.h"

int main() {
Expand Down
2 changes: 1 addition & 1 deletion tests/performance/rcclAllGather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All rights reserved.
#include <vector>
#include "common.h"
#include "performance/performance.h"
#include "rccl/rccl.h"
#include "rccl.h"

void CallAllGather(signed char* psrc_buff, signed char* pdst_buff,
size_t buff_len, rcclComm_t comm, hipStream_t stream) {
Expand Down
2 changes: 1 addition & 1 deletion tests/performance/rcclAllReduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All rights reserved.
#include <vector>
#include "common.h"
#include "performance/performance.h"
#include "rccl/rccl.h"
#include "rccl.h"

void CallAllReduce(signed char* psrc_buff, signed char* pdst_buff,
size_t buff_len, rcclRedOp_t op, rcclComm_t comm,
Expand Down
2 changes: 1 addition & 1 deletion tests/performance/rcclBcast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All rights reserved.
#include <vector>
#include "common.h"
#include "performance/performance.h"
#include "rccl/rccl.h"
#include "rccl.h"

void CallBcast(signed char* psrc_buff, size_t buff_len, int root,
rcclComm_t comm, hipStream_t stream) {
Expand Down
2 changes: 1 addition & 1 deletion tests/performance/rcclReduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All rights reserved.
#include <vector>
#include "common.h"
#include "performance/performance.h"
#include "rccl/rccl.h"
#include "rccl.h"

void CallReduce(signed char* psrc_buff, signed char* pdst_buff, size_t buff_len,
rcclRedOp_t op, int root, rcclComm_t comm, hipStream_t stream) {
Expand Down
2 changes: 1 addition & 1 deletion tests/stress/rcclReduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2017 - Present Advanced Micro Devices, Inc.
All rights reserved.
*/

#include "rccl/rccl.h"
#include "rccl.h"
#include "validation/validate.h"
#include <iostream>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/rcclCommInitRank.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <rccl/rccl.h>
#include <rccl.h>
#include "gtest/gtest.h"

TEST(CommInitRankTest, T01) {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/rcclUniqueId.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <rccl/rccl.h>
#include <rccl.h>
#include <limits.h>
#include "gtest/gtest.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/validation/rcclAllGather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2017 - Present Advanced Micro Devices, Inc.
All rights reserved.
*/

#include "rccl/rccl.h"
#include "rccl.h"
//#include "rcclCheck.h"
#include <algorithm>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion tests/validation/rcclAllReduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2017 - Present Advanced Micro Devices, Inc.
All rights reserved.
*/

#include "rccl/rccl.h"
#include "rccl.h"
#include <algorithm>
#include <iostream>
#include <list>
Expand Down
2 changes: 1 addition & 1 deletion tests/validation/rcclBcast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2017 - Present Advanced Micro Devices, Inc.
All rights reserved.
*/

#include "rccl/rccl.h"
#include "rccl.h"
//#include "rcclCheck.h"
#include <algorithm>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion tests/validation/rcclCommBcast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All rights reserved.

#include <iostream>
#include <vector>
#include "rccl/rccl.h"
#include "rccl.h"
#include "common.h"
#include "validate.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/validation/rcclMultiStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2017 - Present Advanced Micro Devices, Inc.
All rights reserved.
*/

#include "rccl/rccl.h"
#include "rccl.h"
#include <algorithm>
#include <iostream>
#include <list>
Expand Down
2 changes: 1 addition & 1 deletion tests/validation/rcclReduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ All rights reserved.
#include <typeinfo>
#include <vector>
#include "common.h"
#include "rccl/rccl.h"
#include "rccl.h"
#include "validation/validate.h"

void CallReduce(signed char* psrc_buff, signed char* pdst_buff, size_t buff_len,
Expand Down

0 comments on commit 9c7b2e3

Please sign in to comment.