From 811df250e64c5e4155fa1464883f465735945657 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Thu, 1 Sep 2016 15:11:12 +0530 Subject: [PATCH] Fixed module_api/Makefile to set flags based on HIP_PLATFORM Change-Id: I2fa9a556e0c4f25f4963ecef1d25eb922f9af1b9 --- samples/0_Intro/module_api/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/samples/0_Intro/module_api/Makefile b/samples/0_Intro/module_api/Makefile index 582899b6df..25ae7b8411 100644 --- a/samples/0_Intro/module_api/Makefile +++ b/samples/0_Intro/module_api/Makefile @@ -3,14 +3,16 @@ ifeq (,$(HIP_PATH)) HIP_PATH=../../.. endif HIPCC=$(HIP_PATH)/bin/hipcc +HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --compiler) + +ifeq (${HIP_PLATFORM}, hcc) + GENCODEOBJECT_FLAGS=--target-isa-fiji +endif all: vcpy_isa.compile runKernel.hip.out -runKernel.cuda.out: runKernel.cpp - nvcc runKernel.cpp -o $@ - vcpy_isa.compile: vcpy_isa.cpp - $(HIPCC) --gencodeobject --target-isa=fiji vcpy_isa.cpp -o vcpy_isa.co + $(HIPCC) --gencodeobject $(GENCODEOBJECT_FLAGS) vcpy_isa.cpp -o vcpy_isa.co runKernel.hip.out: runKernel.cpp $(HIPCC) runKernel.cpp -o runKernel.hip.out