Λογότυπο
Εξερεύνηση Βοήθεια
Είσοδος
AI/rocm-systems
Παρακολούθηση 2
Αστέρι 0 Fork 0
Κώδικας Ζητήματα Pull Requests Δράσεις Πακέτα Έργα Κυκλοφορίες Wiki Δραστηριότητα
Files
eee7fa6072114f07efc525d294fc6aeff5bdf57f
rocm-systems/hipamd/tests/src/runtimeApi/synchronization/memcpyInt.device.cpp
T

13 γραμμές
324 B
C++
Ακατέργαστο Κανονική Προβολή Ιστορικό

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 Αντιγραφή Permalink
© 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 Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어