Fixed offline kernel compilation

1. Removed vcpy_isa.ptx as it should be generated during make
2. Made argument padding specific to hcc path
3. Renamed --gencodeobject to --genco
4. Changed Makefile to work on both nvcc and hcc path

Change-Id: Ifd053d541085d9ce4fd37bc21b07674786c7163e
This commit is contained in:
Aditya Atluri
2016-09-01 10:39:14 -05:00
parent b7b78d3b86
commit f22fda1291
4 changed files with 29 additions and 48 deletions
+18 -6
View File
@@ -6,16 +6,28 @@ HIPCC=$(HIP_PATH)/bin/hipcc
HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --compiler)
ifeq (${HIP_PLATFORM}, hcc)
GENCODEOBJECT_FLAGS=--target-isa-fiji
GENCODEOBJECT_FLAGS=--target-isa=fiji
vcpy_isa.compile: vcpy_isa.cpp
$(HIPCC) --genco $(GENCODEOBJECT_FLAGS) vcpy_isa.cpp -o vcpy_isa.co
clean:
rm -f *.co *.out
endif
ifeq (${HIP_PLATFORM}, nvcc)
vcpy_isa.compile: vcpy_isa.cu
$(HIPCC) --genco vcpy_isa.cu -o vcpy_isa.ptx
clean:
rm -f *.ptx *.out
endif
all: vcpy_isa.compile runKernel.hip.out
vcpy_isa.compile: vcpy_isa.cpp
$(HIPCC) --gencodeobject $(GENCODEOBJECT_FLAGS) vcpy_isa.cpp -o vcpy_isa.co
runKernel.hip.out: runKernel.cpp
$(HIPCC) runKernel.cpp -o runKernel.hip.out
clean:
rm -f *.co *.out