2020-02-03 22:06:44 +00:00
|
|
|
# Copyright (c) 2019-2020 Advanced Micro Devices, Inc. All rights reserved.
|
2022-08-04 13:38:41 -04:00
|
|
|
HIP_PATH ?= $(wildcard /opt/rocm)
|
2020-02-03 22:06:44 +00:00
|
|
|
ifeq (,$(HIP_PATH))
|
|
|
|
|
HIP_PATH = ../../..
|
|
|
|
|
endif
|
|
|
|
|
HIPCC = $(HIP_PATH)/bin/hipcc
|
|
|
|
|
|
|
|
|
|
EXE = topo_expl
|
2023-02-04 01:43:38 +00:00
|
|
|
CXXFLAGS = -g -O3 -Iinclude -Ihipify_rccl/include -Ihipify_rccl/graph -I/opt/rocm/include/ -DTOPO_EXPL -DENABLE_TRACE -DNVTX_NO_IMPL
|
2020-02-03 22:06:44 +00:00
|
|
|
|
2023-01-06 07:29:40 -08:00
|
|
|
files = $(EXE).cpp model.cpp utils.cpp hipify_rccl/graph/topo.cc hipify_rccl/graph/rings.cc hipify_rccl/graph/paths.cc hipify_rccl/graph/trees.cc ../../src/misc/param.cc \
|
|
|
|
|
hipify_rccl/graph/search.cc hipify_rccl/graph/connect.cc hipify_rccl/graph/tuning.cc hipify_rccl/graph/xml.cc ../../src/misc/nvmlwrap_stub.cc hipify_rccl/graph/rome_models.cc
|
2020-02-03 22:06:44 +00:00
|
|
|
|
2023-01-06 07:29:40 -08:00
|
|
|
all: hipify $(EXE)
|
2020-02-03 22:06:44 +00:00
|
|
|
|
|
|
|
|
$(EXE): $(files)
|
|
|
|
|
$(HIPCC) $(CXXFLAGS) $^ -o $@
|
|
|
|
|
|
2023-01-06 07:29:40 -08:00
|
|
|
hipify:
|
2023-02-04 01:43:38 +00:00
|
|
|
mkdir -p hipify_rccl
|
|
|
|
|
cp -a ../../src/include/ hipify_rccl/
|
|
|
|
|
cp -a ../../src/graph/ hipify_rccl/
|
2023-01-06 07:29:40 -08:00
|
|
|
hipify-perl -inplace -quiet-warnings hipify_rccl/include/*.h
|
|
|
|
|
hipify-perl -inplace -quiet-warnings hipify_rccl/graph/*
|
|
|
|
|
|
2020-02-03 22:06:44 +00:00
|
|
|
clean:
|
2023-01-06 07:29:40 -08:00
|
|
|
rm -rf hipify_rccl
|
2020-02-03 22:06:44 +00:00
|
|
|
rm -f *.o $(EXE)
|