forked from FluidNumerics/SELF
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.compiler
More file actions
34 lines (27 loc) · 1.25 KB
/
make.compiler
File metadata and controls
34 lines (27 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Compiler
HIPFC ?= /opt/rocm/bin/hipfc
HIPFORT_COMPILER ?= gfortran
HIPFORT_GPU ?= gfx900
ROCM_DIR ?= /opt/rocm
CUDA_PATH ?= /usr/local/cuda
PREC ?= single
SELF_FFLAGS ?= -cpp -pg -g -O3 -C -Wall -fbounds-check -fbacktrace --coverage -ffpe-trap=invalid,zero,overflow
ifeq ($(PREC),double)
SELF_FFLAGS += -DDOUBLE_PRECISION
SELF_CXXFLAGS += -DDOUBLE_PRECISION
endif
FC = $(HIPFC)
CXX = $(HIPFC)
AR = gcc-ar
SELF_FFLAGS += -hipfort-compiler $(HIPFORT_COMPILER) -rocm-path $(ROCM_DIR) --offload-arch=$(GPU_TARGET)
SELF_CXXFLAGS += -v -hipfort-compiler $(HIPFORT_COMPILER) -rocm-path $(ROCM_DIR) --offload-arch=$(GPU_TARGET) -I$(ROCM_DIR)/include
# ifeq ($(findstring gfx, $(OFFLOAD_ARCH)), gfx)
# SELF_SELF_FFLAGS += -hipfort-compiler $(HIPFORT_COMPILER) -rocm-path $(ROCM_DIR) --offload-arch=$(GPU_TARGET)
# SELF_SELF_CXXFLAGS += -hipfort-compiler $(HIPFORT_COMPILER) -rocm-path $(ROCM_DIR) --offload-arch=$(GPU_TARGET)
# else ifeq ($(findstring sm, $(OFFLOAD_ARCH)), sm)
# SELF_SELF_FFLAGS += -hipfort-compiler $(HIPFORT_COMPILER) -rocm-path $(ROCM_DIR) --offload-arch=$(GPU_TARGET)
# SELF_SELF_CXXFLAGS += --gpu-architecture $(GPU_TARGET)
# endif
$(info HIPFC : $(HIPFC))
$(info Fortran Compiler : $(HIPFORT_COMPILER))
$(GPU Target : $(HIPFORT_GPU))