forked from lijiext/lammps
Merge pull request #2141 from akohlmey/kokkos-make-arch-case-insensitive
Make kokkos configuration keywords with gmake case insensitive
This commit is contained in:
commit
9ca7091385
|
@ -24,7 +24,7 @@ KOKKOS_DEVICES ?= "OpenMP"
|
|||
# ARM: ARMv80,ARMv81,ARMv8-ThunderX,ARMv8-TX2
|
||||
# IBM: BGQ,Power7,Power8,Power9
|
||||
# AMD-GPUS: Vega900,Vega906
|
||||
# AMD-CPUS: AMDAVX,Ryzen,EPYC
|
||||
# AMD-CPUS: AMDAVX,EPYC
|
||||
KOKKOS_ARCH ?= ""
|
||||
# Options: yes,no
|
||||
KOKKOS_DEBUG ?= "no"
|
||||
|
@ -51,11 +51,15 @@ KOKKOS_HIP_OPTIONS ?= ""
|
|||
# Options: enable_async_dispatch
|
||||
KOKKOS_HPX_OPTIONS ?= ""
|
||||
|
||||
# Helper functions for conversion to upper case
|
||||
uppercase_TABLE:=a,A b,B c,C d,D e,E f,F g,G h,H i,I j,J k,K l,L m,M n,N o,O p,P q,Q r,R s,S t,T u,U v,V w,W x,X y,Y z,Z
|
||||
uppercase_internal=$(if $1,$$(subst $(firstword $1),$(call uppercase_internal,$(wordlist 2,$(words $1),$1),$2)),$2)
|
||||
uppercase=$(eval uppercase_RESULT:=$(call uppercase_internal,$(uppercase_TABLE),$1))$(uppercase_RESULT)
|
||||
# Return a 1 if a string contains a substring and 0 if not
|
||||
# Note the search string should be without '"'
|
||||
# Example: $(call kokkos_has_string,"hwloc,librt",hwloc)
|
||||
# Will return a 1
|
||||
kokkos_has_string=$(if $(findstring $2,$1),1,0)
|
||||
kokkos_has_string=$(if $(findstring $(call uppercase,$2),$(call uppercase,$1)),1,0)
|
||||
# Returns 1 if the path exists, 0 otherwise
|
||||
# Example: $(call kokkos_path_exists,/path/to/file)
|
||||
# Will return a 1 if /path/to/file exists
|
||||
|
@ -390,7 +394,6 @@ KOKKOS_INTERNAL_USE_ARCH_IBM := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_
|
|||
|
||||
# AMD based.
|
||||
KOKKOS_INTERNAL_USE_ARCH_AMDAVX := $(call kokkos_has_string,$(KOKKOS_ARCH),AMDAVX)
|
||||
KOKKOS_INTERNAL_USE_ARCH_RYZEN := $(call kokkos_has_string,$(KOKKOS_ARCH),Ryzen)
|
||||
KOKKOS_INTERNAL_USE_ARCH_EPYC := $(call kokkos_has_string,$(KOKKOS_ARCH),EPYC)
|
||||
KOKKOS_INTERNAL_USE_ARCH_VEGA900 := $(call kokkos_has_string,$(KOKKOS_ARCH),Vega900)
|
||||
KOKKOS_INTERNAL_USE_ARCH_VEGA906 := $(call kokkos_has_string,$(KOKKOS_ARCH),Vega906)
|
||||
|
|
Loading…
Reference in New Issue