Files
rocm-systems/samples/0_Intro/module_api/Makefile
T
Aditya Atluri 6ca7a87e0e corrected offline kernel compilation on hipcc path
1. hipgenisa.sh now adds int main(){} during kernel compilation. User does not have to put it there
2. Renamed vcpy_isa.cpp to vcpy_kernel.cpp
3. Removed vcpy_isa.cu as the kernel code should be common for both paths
4. Changed Makefile and runkernel.cpp to work with above changes

Change-Id: I9f8c84706b44bb500bc493a68e959762b55a0142
2016-09-02 13:17:17 -05:00

37 строки
698 B
Makefile

HIP_PATH?= $(wildcard /opt/rocm/hip)
ifeq (,$(HIP_PATH))
HIP_PATH=../../..
endif
HIPCC=$(HIP_PATH)/bin/hipcc
OPT=
HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --compiler)
ifeq (${HIP_PLATFORM}, hcc)
GENCODEOBJECT_FLAGS=--target-isa=fiji
all: runKernel.hip.out
vcpy_kernel.compile: vcpy_kernel.cpp
$(HIPCC) --genco $(GENCODEOBJECT_FLAGS) vcpy_kernel.cpp -o vcpy_kernel.co
clean:
rm -f *.co *.out
endif
ifeq (${HIP_PLATFORM}, nvcc)
vcpy_kernel.compile: vcpy_kernel.cpp
$(HIPCC) --genco vcpy_kernel.cpp -o vcpy_kernel.ptx
clean:
rm -f *.ptx *.out
endif
all: vcpy_kernel.compile runKernel.hip.out
runKernel.hip.out: runKernel.cpp
$(HIPCC) $(OPT) runKernel.cpp -o runKernel.hip.out