Improve dependency gathering logic (#7345)

This unfies the rocm/cuda dependency logic into the makefile
and fixes a missing define which broke windows rocm
This commit is contained in:
Daniel Hiltgen
2024-10-24 09:51:53 -07:00
committed by GitHub
parent 0ccc73251a
commit 3085c47bea
7 changed files with 31 additions and 24 deletions

View File

@@ -57,12 +57,18 @@ ifeq ($(OS),windows)
EXE_EXT := .exe
SHARED_PREFIX :=
CPU_FLAG_PREFIX := /arch:
ifneq ($(HIP_PATH),)
# If HIP_PATH has spaces, hipcc trips over them when subprocessing
HIP_PATH := $(shell cygpath -m -s "$(patsubst %\,%,$(HIP_PATH))")
export HIP_PATH
endif
else ifeq ($(OS),linux)
CP := cp -af
OBJ_EXT := o
SHARED_EXT := so
SHARED_PREFIX := lib
CPU_FLAG_PREFIX := -m
HIP_PATH?=/opt/rocm
else
OBJ_EXT := o
SHARED_EXT := so