summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyuw@linux.intel.com>2014-10-24 16:07:32 +0800
committerZhenyu Wang <zhenyuw@linux.intel.com>2014-10-24 16:07:32 +0800
commit5e831d400a7dd192d5c4984536380d5617e2c096 (patch)
treeb449ba9fc4767ef0040418eb232076740426db77
parent41966d1b58f162a57a9aa625cb65e47f02bf9d63 (diff)
Revert "Print warning when requested size exceeds max size"HEADmaster
Too chatty. This reverts commit 6fa69f4194386a9c04cd5175d046220af06a066e.
-rw-r--r--MPBenchmarks/ArithmeticTasks.cpp10
-rw-r--r--MPBenchmarks/MemoryTasks.cpp15
2 files changed, 5 insertions, 20 deletions
diff --git a/MPBenchmarks/ArithmeticTasks.cpp b/MPBenchmarks/ArithmeticTasks.cpp
index b27ed37..61ef40d 100644
--- a/MPBenchmarks/ArithmeticTasks.cpp
+++ b/MPBenchmarks/ArithmeticTasks.cpp
@@ -34,10 +34,7 @@ double AddNGPUTask::run(int workgroupSize,size_t sz)
// Check allocation size
size_t max_sz = c->getDeviceMaxMemAllocSize(); // Max global mem size
- if (3*sz > max_sz) {
- fprintf(stderr, "Warn: %lu exceed max size %lu\n", 3*sz, max_sz);
- return -1;
- }
+ if (3*sz > max_sz) return -1;
cl::Buffer * a = c->createBuffer(CL_MEM_READ_WRITE,sz);
cl::Buffer * b = c->createBuffer(CL_MEM_READ_WRITE,sz);
@@ -95,10 +92,7 @@ double Mul1GPUTask::run(int workgroupSize,size_t sz)
// Check allocation size
size_t max_sz = c->getDeviceMaxMemAllocSize(); // Max global mem size
- if (2*sz > max_sz) {
- fprintf(stderr, "Warn: %lu exceed max size %lu\n", 2*sz, max_sz);
- return -1;
- }
+ if (2*sz > max_sz) return -1;
cl::Buffer * a = c->createBuffer(CL_MEM_READ_WRITE,sz);
cl::Buffer * y = c->createBuffer(CL_MEM_READ_WRITE,sz);
diff --git a/MPBenchmarks/MemoryTasks.cpp b/MPBenchmarks/MemoryTasks.cpp
index dabfc40..7daa0d2 100644
--- a/MPBenchmarks/MemoryTasks.cpp
+++ b/MPBenchmarks/MemoryTasks.cpp
@@ -18,15 +18,9 @@ double CopyGPUTask::run(int workgroupSize,size_t sz)
size_t max_sz = c->getDeviceMaxMemAllocSize(); // Max global mem size
if (mCT == DEVICE_TO_DEVICE_COPY)
{
- if (2*sz > max_sz) {
- fprintf(stderr, "Warn: %lu exceed max size %lu\n", 2*sz, max_sz);
- return -1;
- }
- }
- if (sz > max_sz) {
- fprintf(stderr, "Warn: %lu exceed max size %lu\n", sz, max_sz);
- return -1;
+ if (2*sz > max_sz) return -1;
}
+ if (sz > max_sz) return -1;
bool ok = true;
cl::Buffer * a = c->createBuffer(CL_MEM_READ_WRITE,sz);
@@ -109,10 +103,7 @@ double ZeroGPUTask::run(int workgroupSize,size_t sz)
// Check allocation size
size_t max_sz = c->getDeviceMaxMemAllocSize(); // Max global mem size
- if (sz > max_sz) {
- fprintf(stderr, "Warn: %lu exceed max size %lu\n", sz, max_sz);
- return -1;
- }
+ if (sz > max_sz) return -1;
cl::Buffer * a = c->createBuffer(CL_MEM_READ_WRITE,sz);
unsigned char * buf = (unsigned char *)_aligned_malloc(sz,16);