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

@@ -9,8 +9,7 @@ ifeq ($(OS),windows)
CUDA_BASE_DIR := $(dir $(shell cygpath -m -s "$(CUDA_PATH)\\.." 2>/dev/null))
CUDA_11:=$(shell ls -d $(CUDA_BASE_DIR)/v11.? 2>/dev/null)
CUDA_12:=$(shell ls -d $(CUDA_BASE_DIR)/v12.? 2>/dev/null)
HIP_PATH_83 := $(shell cygpath -m -s "$(subst \,/,$(HIP_PATH))" 2>/dev/null)
HIP_LIB_DIR := $(shell ls -d $(HIP_PATH_83)/lib 2>/dev/null)
HIP_LIB_DIR := $(shell ls -d $(HIP_PATH)/lib 2>/dev/null)
else ifeq ($(OS),linux)
HIP_PATH?=/opt/rocm
HIP_LIB_DIR := $(shell ls -d $(HIP_PATH)/lib 2>/dev/null)