Logo
Explore Help
Sign In
AI/rocm-systems
2
0
Fork 0
You've already forked rocm-systems
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
93e595c26720bcbf0d2db1651374971763584917
rocm-systems/hipamd/tests/src/runtimeApi/synchronization/memcpyInt.device.cpp
T

14 lines
324 B
C++
Raw Normal View History

Add copy_coherency test
2017-10-07 07:46:40 -07:00
#include <hip/hip_runtime.h>
This implements the trivial change needed to move back from the hip{Something}_{x, y, z} macros to the natural CUDA syntax of Something.{x, y, z}. This is contained in lines 384-404 in hip_runtime.h. All of the other changes have to do with changing unit tests to use this syntax. The macros are retained for backwards compatibility.
2017-11-19 01:54:12 +00:00
Add copy_coherency test
2017-10-07 07:46:40 -07:00
extern "C" __global__ void
memcpyIntKernel(hipLaunchParm lp, int *dst, const int * src, size_t numElements)
{
This implements the trivial change needed to move back from the hip{Something}_{x, y, z} macros to the natural CUDA syntax of Something.{x, y, z}. This is contained in lines 384-404 in hip_runtime.h. All of the other changes have to do with changing unit tests to use this syntax. The macros are retained for backwards compatibility.
2017-11-19 01:54:12 +00:00
int gid = (blockIdx.x * blockDim.x + threadIdx.x);
int stride = blockDim.x * gridDim.x ;
Add copy_coherency test
2017-10-07 07:46:40 -07:00
for (size_t i= gid; i< numElements; i+=stride){
dst[i] = src[i];
}
};
Reference in New Issue Copy Permalink
© 2020 badstorm.xyz - : 1.26.4
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어