From 7735b454a133547a23b189f617ba2062666f4ade Mon Sep 17 00:00:00 2001 From: Aditya Atluri Date: Fri, 31 Mar 2017 12:11:34 -0500 Subject: [PATCH] added new api hipHccModuleLaunchKernel 1. hipHccModuleLaunchKernel is same as hipModuleLaunchKernel with OpenCL workitem model 2. Added copy right 3. Fixed header naming Change-Id: I6a7c35a3566e2f8d3f5056613e34193775d4b236 --- samples/0_Intro/module_api/runKernel.cpp | 18 ++++++++++-------- samples/0_Intro/module_api/vcpy_kernel.cpp | 3 +-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/samples/0_Intro/module_api/runKernel.cpp b/samples/0_Intro/module_api/runKernel.cpp index 201892a4a1..e7d54beb54 100644 --- a/samples/0_Intro/module_api/runKernel.cpp +++ b/samples/0_Intro/module_api/runKernel.cpp @@ -1,5 +1,5 @@ /* -Copyright (c) 2015-2017 Advanced Micro Devices, Inc. All rights reserved. +Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22,9 +22,10 @@ THE SOFTWARE. #include "hip/hip_runtime.h" #include "hip/hip_runtime_api.h" -#include -#include -#include +#include +#include +#include +#include #define LEN 64 #define SIZE LEN<<2 @@ -43,10 +44,10 @@ int main(){ B[i] = 0.0f; } - hipInit(0); - hipDevice_t device; - hipCtx_t context; - hipDeviceGet(&device, 0); + hipInit(0); + hipDevice_t device; + hipCtx_t context; + hipDeviceGet(&device, 0); hipCtxCreate(&context, 0, device); hipMalloc((void**)&Ad, SIZE); @@ -101,6 +102,7 @@ int main(){ hipModuleLaunchKernel(Function, 1, 1, 1, LEN, 1, 1, 0, 0, NULL, (void**)&config); hipMemcpyDtoH(B, Bd, SIZE); + int mismatchCount = 0; for(uint32_t i=0;i