Update square sample for recent HIP ease-of-use improvements

This commit is contained in:
Ben Sander
2017-12-02 07:44:27 -06:00
parent 071b260cf6
commit 421a50e830
3 changed files with 16 additions and 22 deletions
+9 -12
View File
@@ -1,20 +1,17 @@
HIP_PATH?= $(wildcard /opt/rocm/hip)
HIPCC=$(HIP_PATH)/bin/hipcc
all: square.hip.out
all: square.out
# Step
square.cpp:
$(HIP_PATH)/bin/hipify-perl square.cu > square.cpp
square.out: square.cpp
$(HIPCC) $(CXXFLAGS) square.cpp -o $@
# make step to make native cuda app, if on cuda machine
square.cuda.out : square.cu
nvcc square.cu -o $@
#hipify square.cu > square.cpp
# Then review & finish port in square.cpp
#
square.hip.out: square.hipref.cpp
$(HIPCC) $(CXXFLAGS) square.hipref.cpp -o $@
clean:
rm -f *.o *.out