module_api sample: Remove unnecessary platform checks

Change-Id: I1d531264d51ff952a3a68d554672b6d293e23379
这个提交包含在:
Maneesh Gupta
2016-09-04 21:25:14 +05:30
父节点 34469e51f1
当前提交 0cc51f2a72
修改 2 个文件,包含 10 行新增28 行删除
+9 -20
查看文件
@@ -3,31 +3,20 @@ ifeq (,$(HIP_PATH))
HIP_PATH=../../..
endif
HIPCC=$(HIP_PATH)/bin/hipcc
OPT=
HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --compiler)
all: vcpy_kernel.compile runKernel.hip.out
ifeq (${HIP_PLATFORM}, hcc)
GENCO_FLAGS=--target-isa=fiji
endif
all: vcpy_kernel.code runKernel.hip.out
runKernel.hip.out: runKernel.cpp
$(HIPCC) $(OPT) runKernel.cpp -o runKernel.hip.out
$(HIPCC) $(HIPCC_FLAGS) $< -o $@
ifeq (${HIP_PLATFORM}, hcc)
vcpy_kernel.compile: vcpy_kernel.cpp
$(HIPCC) --genco --target-isa=fiji vcpy_kernel.cpp -o vcpy_kernel.co
vcpy_kernel.code: vcpy_kernel.cpp
$(HIPCC) --genco $(GENCO_FLAGS) $< -o $@
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
rm -f *.code *.out
+1 -8
查看文件
@@ -26,15 +26,8 @@ THE SOFTWARE.
#define LEN 64
#define SIZE LEN<<2
#ifdef __HIP_PLATFORM_HCC__
#define fileName "vcpy_kernel.co"
#define fileName "vcpy_kernel.code"
#define kernel_name "hello_world"
#endif
#ifdef __HIP_PLATFORM_NVCC__
#define fileName "vcpy_kernel.ptx"
#define kernel_name "hello_world"
#endif
int main(){
float *A, *B;