diff --git a/projects/hip/samples/0_Intro/module_api/Makefile b/projects/hip/samples/0_Intro/module_api/Makefile index 99cff6bc0a..2570290f07 100644 --- a/projects/hip/samples/0_Intro/module_api/Makefile +++ b/projects/hip/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/samples/0_Intro/module_api/vcpy_kernel.cu b/projects/hip/samples/0_Intro/module_api/vcpy_kernel.cu new file mode 100644 index 0000000000..ead7d70311 --- /dev/null +++ b/projects/hip/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]; + +}