From 3472b0b002f7b93717e100a4cc44d99299b5a5cd Mon Sep 17 00:00:00 2001 From: pensun Date: Sat, 3 Sep 2016 21:06:58 -0500 Subject: [PATCH] For module_api sample, use vcpy_kernel.cu to generate ptx file for NV path. Change-Id: Id0033678834288c4eaa56b12e7d447119be99deb [ROCm/hip-tests commit: 49971e8c9e94252f4ceb3d27f8818153a23e6192] --- projects/hip-tests/samples/0_Intro/module_api/Makefile | 4 ++-- .../hip-tests/samples/0_Intro/module_api/vcpy_kernel.cu | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 projects/hip-tests/samples/0_Intro/module_api/vcpy_kernel.cu diff --git a/projects/hip-tests/samples/0_Intro/module_api/Makefile b/projects/hip-tests/samples/0_Intro/module_api/Makefile index 99cff6bc0a..2570290f07 100644 --- a/projects/hip-tests/samples/0_Intro/module_api/Makefile +++ b/projects/hip-tests/samples/0_Intro/module_api/Makefile @@ -21,8 +21,8 @@ endif ifeq (${HIP_PLATFORM}, nvcc) -vcpy_kernel.compile: vcpy_kernel.cpp - $(HIPCC) --genco vcpy_kernel.cpp -o vcpy_kernel.ptx +vcpy_kernel.compile: vcpy_kernel.cu + $(HIPCC) --genco vcpy_kernel.cu -o vcpy_kernel.ptx clean: rm -f *.ptx *.out diff --git a/projects/hip-tests/samples/0_Intro/module_api/vcpy_kernel.cu b/projects/hip-tests/samples/0_Intro/module_api/vcpy_kernel.cu new file mode 100644 index 0000000000..ead7d70311 --- /dev/null +++ b/projects/hip-tests/samples/0_Intro/module_api/vcpy_kernel.cu @@ -0,0 +1,6 @@ +extern "C" __global__ void hello_world(float *a, float *b) +{ + int tx = threadIdx.x; + b[tx] = a[tx]; + +}