diff --git a/samples/0_Intro/module_api/Makefile b/samples/0_Intro/module_api/Makefile index 8981938e91..99cff6bc0a 100644 --- a/samples/0_Intro/module_api/Makefile +++ b/samples/0_Intro/module_api/Makefile @@ -11,8 +11,8 @@ ifeq (${HIP_PLATFORM}, hcc) all: runKernel.hip.out -vcpy_isa.compile: vcpy_isa.cpp - $(HIPCC) --genco $(GENCODEOBJECT_FLAGS) vcpy_isa.cpp -o vcpy_isa.co +vcpy_kernel.compile: vcpy_kernel.cpp + $(HIPCC) --genco $(GENCODEOBJECT_FLAGS) vcpy_kernel.cpp -o vcpy_kernel.co clean: rm -f *.co *.out @@ -21,15 +21,15 @@ endif ifeq (${HIP_PLATFORM}, nvcc) -vcpy_isa.compile: vcpy_isa.cu - $(HIPCC) --genco vcpy_isa.cu -o vcpy_isa.ptx +vcpy_kernel.compile: vcpy_kernel.cpp + $(HIPCC) --genco vcpy_kernel.cpp -o vcpy_kernel.ptx clean: rm -f *.ptx *.out endif -all: vcpy_isa.compile runKernel.hip.out +all: vcpy_kernel.compile runKernel.hip.out runKernel.hip.out: runKernel.cpp $(HIPCC) $(OPT) runKernel.cpp -o runKernel.hip.out diff --git a/samples/0_Intro/module_api/runKernel.cpp b/samples/0_Intro/module_api/runKernel.cpp index dcbaa4cd35..1156b8ddbf 100644 --- a/samples/0_Intro/module_api/runKernel.cpp +++ b/samples/0_Intro/module_api/runKernel.cpp @@ -27,12 +27,12 @@ THE SOFTWARE. #define SIZE LEN<<2 #ifdef __HIP_PLATFORM_HCC__ -#define fileName "vcpy_isa.co" +#define fileName "vcpy_kernel.co" #define kernel_name "ZN12_GLOBAL__N_146_Z11hello_world16grid_launch_parmPfS0__functor19__cxxamp_trampolineEiiiiiiPKfPf" #endif #ifdef __HIP_PLATFORM_NVCC__ -#define fileName "vcpy_isa.ptx" +#define fileName "vcpy_kernel.ptx" #define kernel_name "hello_world" #endif @@ -67,8 +67,8 @@ int main(){ hipModuleGetFunction(&Function, Module, kernel_name); #ifdef __HIP_PLATFORM_HCC__ - uint32_t len = LEN; - uint32_t one = 1; + uint32_t len = LEN; + uint32_t one = 1; std::vectorargBuffer(5); uint32_t *ptr32_t = (uint32_t*)&argBuffer[0]; diff --git a/samples/0_Intro/module_api/vcpy_isa.cu b/samples/0_Intro/module_api/vcpy_isa.cu deleted file mode 100644 index d2a0838604..0000000000 --- a/samples/0_Intro/module_api/vcpy_isa.cu +++ /dev/null @@ -1,6 +0,0 @@ - -extern "C" __global__ void hello_world(float *a, float *b) -{ - int tx = threadIdx.x; - b[tx] = a[tx]; -} diff --git a/samples/0_Intro/module_api/vcpy_isa.cpp b/samples/0_Intro/module_api/vcpy_kernel.cpp similarity index 91% rename from samples/0_Intro/module_api/vcpy_isa.cpp rename to samples/0_Intro/module_api/vcpy_kernel.cpp index ead3253115..640cf5b1bb 100644 --- a/samples/0_Intro/module_api/vcpy_isa.cpp +++ b/samples/0_Intro/module_api/vcpy_kernel.cpp @@ -6,4 +6,3 @@ __global__ void hello_world(hipLaunchParm lp, float *a, float *b) b[tx] = a[tx]; } -int main(){}