From 7b8ec8fa6d9c81f5af849564d160af59f37d4e92 Mon Sep 17 00:00:00 2001 From: Aditya Atluri Date: Thu, 31 Mar 2016 02:14:12 -0500 Subject: [PATCH] Added directory for stress testing [ROCm/clr commit: 8d406b68d87cec782b099ab0a78c5a85c09f6203] --- .../clr/hipamd/tests/src/hipMemcpyAsync2.cpp | 15 +++++ .../clr/hipamd/tests/src/stress/README.md | 2 + .../tests/src/stress/hipStressMemcpy.cpp | 56 +++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 projects/clr/hipamd/tests/src/hipMemcpyAsync2.cpp create mode 100644 projects/clr/hipamd/tests/src/stress/README.md create mode 100644 projects/clr/hipamd/tests/src/stress/hipStressMemcpy.cpp diff --git a/projects/clr/hipamd/tests/src/hipMemcpyAsync2.cpp b/projects/clr/hipamd/tests/src/hipMemcpyAsync2.cpp new file mode 100644 index 0000000000..4d7af21c72 --- /dev/null +++ b/projects/clr/hipamd/tests/src/hipMemcpyAsync2.cpp @@ -0,0 +1,15 @@ +#include"test_common.h" + +#define SIZE 1024*1024 + +int main(){ + float *A, *Ad; + HIPCHECK(hipHostMalloc((void**)&A,SIZE, hipHostMallocDefault)); + HIPCHECK(hipMalloc((void**)&Ad, SIZE)); + hipStream_t stream; + HIPCHECK(hipStreamCreate(&stream)); + for(int i=0;i +#include + +#define NUM_SIZE 8 +#define NUM_ITER 1 << 30 +static size_t size[NUM_SIZE]; + +void setup(){ + for(int i=0;i