Logo
Erkunden Hilfe
Anmelden
AI/rocm-systems
Beobachten 2
Favorisieren 0 Fork 0
Code Issues Pull-Requests Actions Pakete Projekte Releases Wiki Aktivität
Dateien
eee7fa6072114f07efc525d294fc6aeff5bdf57f
rocm-systems/hipamd/tests/src/runtimeApi/synchronization/memcpyInt.device.cpp
T

13 Zeilen
324 B
C++
Originalformat Normale Ansicht Verlauf

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];
}
};
In neuem Issue referenzieren Permalink kopieren
© 2020 badstorm.xyz - : 28.2.0
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 Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어