Merge remote-tracking branch 'nccl/master' into develop
[ROCm/rccl commit: 858b4e76eb]
This commit is contained in:
@@ -4,19 +4,26 @@
|
||||
# See LICENSE.txt for license information
|
||||
#
|
||||
.DEFAULT_GOAL: build
|
||||
include ../../makefiles/common.mk
|
||||
SRCDIR ?= $(abspath ../..)
|
||||
ROCM_PATH ?= $(wildcard /opt/rocm)
|
||||
CXX = $(ROCM_PATH)/lib/llvm/bin/amdclang++
|
||||
BUILDDIR ?= .
|
||||
NCCLDIR := $(BUILDDIR)
|
||||
HIPIFY_DIR := hipify-profiler
|
||||
|
||||
SRC_FILES := $(wildcard *.c)
|
||||
SRC_FILES := $(wildcard *.cc)
|
||||
HIPIFY_SRC := $(addprefix $(HIPIFY_DIR)/,$(SRC_FILES))
|
||||
|
||||
build: ${BUILDDIR}/librccl-profiler.so
|
||||
build: ${BUILDDIR}/librccl-profiler-example.so
|
||||
|
||||
${BUILDDIR}/librccl-profiler.so: ${SRC_FILES}
|
||||
${BUILDDIR}/librccl-profiler-example.so: $(HIPIFY_SRC)
|
||||
@printf "Compiling %-35s > %s\n" $< $@
|
||||
@mkdir -p ${BUILDDIR}
|
||||
$(CC) -Inccl -fPIC -shared -o $@ $^
|
||||
$(CXX) -D__HIP_PLATFORM_AMD__ -I$(HIPIFY_DIR) -I$(HIPIFY_DIR)/nccl -I$(ROCM_PATH)/include -fPIC -shared -o $@ $^
|
||||
|
||||
$(HIPIFY_DIR)/%.cc: %.cc
|
||||
@mkdir -p $(HIPIFY_DIR)/nccl
|
||||
@cp *.cc *.h $(HIPIFY_DIR)/
|
||||
@cp nccl/*.h $(HIPIFY_DIR)/nccl/
|
||||
@hipify-perl -inplace -quiet-warnings $(HIPIFY_DIR)/*.cc $(HIPIFY_DIR)/*.h
|
||||
|
||||
clean:
|
||||
rm -f ${BUILDDIR}/librccl-profiler.so
|
||||
rm -rf ${BUILDDIR}/librccl-profiler-example.so $(HIPIFY_DIR)
|
||||
Reference in New Issue
Block a user