Fix rocm tool issus, add profiling with rocprof
include ../Makefile.defs
+ROCM ?= $(AOMP)/
TESTNAME = flangtrace
TESTSRC_MAIN = flangtrace.f90
TESTSRC_AUX = hiptrace.f90
TESTSRC_ALL = $(TESTSRC_AUX) $(TESTSRC_MAIN)
-TARGET = -fopenmp -O3 -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=$(AOMP_GPU) -L/opt/rocm-4.1.0/lib/ -lroctx64 -lroctracer64
+TARGET = -fopenmp -O3 -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=$(AOMP_GPU) -L$(ROCM)/lib/ -lroctx64 -lroctracer64
FLANG = flang
OMP_BIN = $(AOMP)/bin/$(FLANG)
@@ -15,4 +16,4 @@ CC = $(OMP_BIN) $(VERBOSE)
include ../Makefile.rules
run:
- LIBOMPTARGET_KERNEL_TRACE=2 ./$(TESTNAME)
+ PATH=$(ROCM)/bin:$(PATH) LIBOMPTARGET_KERNEL_TRACE=2 rocprof --roctx-trace --sys-trace ./$(TESTNAME)
