parent
5d69069177
commit
99cfb88933
|
@ -48,7 +48,7 @@ TEST_F(DataBufferTests, test_alloc_limit_1) {
|
|||
auto odUse = MemoryCounter::getInstance()->allocatedDevice(deviceId);
|
||||
auto ogUse = MemoryCounter::getInstance()->allocatedGroup(MemoryType::HOST);
|
||||
|
||||
auto limitSize = 150 * 1024 * 1024;
|
||||
auto limitSize = odUse + (150 * 1024 * 1024);
|
||||
auto allocSize = 100000000;
|
||||
|
||||
MemoryCounter::getInstance()->setDeviceLimit(deviceId, odLimit + limitSize);
|
||||
|
|
|
@ -51,7 +51,7 @@ TEST_F(DataBufferTestsCuda, test_alloc_limit_1) {
|
|||
auto opUse = MemoryCounter::getInstance()->allocatedGroup(MemoryType::HOST);
|
||||
auto osUse = MemoryCounter::getInstance()->allocatedGroup(MemoryType::DEVICE);
|
||||
|
||||
auto limitSize = 150000000;
|
||||
auto limitSize = odUse + 150000000;
|
||||
auto allocSize = 100000000;
|
||||
|
||||
MemoryCounter::getInstance()->setDeviceLimit(deviceId, odLimit + limitSize);
|
||||
|
@ -72,7 +72,7 @@ TEST_F(DataBufferTestsCuda, test_alloc_limit_1) {
|
|||
|
||||
// this allocation should fail, since we're allocating too much
|
||||
try {
|
||||
DataBuffer bufferFailed(allocSize, DataType::INT32);
|
||||
DataBuffer bufferFailed(allocSize + 1, DataType::INT32);
|
||||
ASSERT_TRUE(false);
|
||||
} catch (allocation_exception &e) {
|
||||
// we expect exception here
|
||||
|
|
Loading…
Reference in New Issue