From f85ed17fdee17ec359a765c4e1314ef9045bd82b Mon Sep 17 00:00:00 2001 From: Aditya Atluri Date: Mon, 11 Apr 2016 13:26:09 -0500 Subject: [PATCH] changed c/hip xcompiling source --- tests/src/experimental/xcompile/hHip.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/src/experimental/xcompile/hHip.c b/tests/src/experimental/xcompile/hHip.c index 1c0f2661c7..661c0c2e5e 100644 --- a/tests/src/experimental/xcompile/hHip.c +++ b/tests/src/experimental/xcompile/hHip.c @@ -52,7 +52,10 @@ int main() memset_hst(b, 2.0f); a->h2d(a); b->h2d(b); - hipLaunchKernel(HIP_KERNEL_NAME(Add), dim3(LEN/1024), dim3(1024), 0, 0, (float*)a->dev_ptr, (float*)b->dev_ptr, (float*)c->dev_ptr, LEN); + dim3 dimGrid, dimBlock; + dimBlock.x = 1024, dimBlock.y = 1, dimBlock.z = 1; + dimGrid.x = LEN/1024, dimGrid.y = 1, dimGrid.z = 1; + hipLaunchKernel(HIP_KERNEL_NAME(Add), dimGrid, dimBlock, 0, 0, (float*)a->dev_ptr, (float*)b->dev_ptr, (float*)c->dev_ptr, LEN); c->d2h(c); assert(((float*)c->hst_ptr)[10] == 3.0f);