SWDEV-311271 - Fix mempool tests
- Reduce the number of blocks in execution, because small allocations can cause page faults and make the system unstable after - Change error codes Change-Id: I77561ffa236e05ad08afdcc79b7770bf36fcdf50
This commit is contained in:
@@ -273,12 +273,12 @@ TEST_CASE("Unit_hipMemPoolSetAccess_Negative_Parameters") {
|
||||
#endif
|
||||
SECTION("Count > num_device") {
|
||||
HIP_CHECK_ERROR(hipMemPoolSetAccess(mempool.mempool(), &desc, (num_dev + 1)),
|
||||
hipErrorNotSupported);
|
||||
hipErrorInvalidDevice);
|
||||
}
|
||||
|
||||
SECTION("Passing invalid desc location type") {
|
||||
desc.location.type = hipMemLocationTypeInvalid;
|
||||
HIP_CHECK_ERROR(hipMemPoolSetAccess(mempool.mempool(), &desc, 1), hipErrorNotSupported);
|
||||
HIP_CHECK_ERROR(hipMemPoolSetAccess(mempool.mempool(), &desc, 1), hipErrorInvalidValue);
|
||||
desc.location.type = hipMemLocationTypeDevice;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ constexpr hipMemPoolProps kPoolProps = {
|
||||
constexpr auto wait_ms = 500;
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
template <typename T> __global__ void kernel_500ms(T* host_res, int clk_rate) {
|
||||
int tid = threadIdx.x + blockIdx.x * blockDim.x;
|
||||
host_res[tid] = tid + 1;
|
||||
@@ -87,7 +86,7 @@ template <typename F> void MallocMemPoolAsync_OneAlloc(F malloc_func, const MemP
|
||||
HIP_CHECK(malloc_func(reinterpret_cast<void**>(&alloc_mem), allocation_size, mempool.mempool(),
|
||||
stream.stream()));
|
||||
|
||||
int blocks = 1024;
|
||||
int blocks = 16;
|
||||
int clk_rate;
|
||||
hipMemPoolAttr attr;
|
||||
if (IsGfx11()) {
|
||||
@@ -154,7 +153,7 @@ void MallocMemPoolAsync_TwoAllocs(F malloc_func, const MemPools mempool_type) {
|
||||
HIP_CHECK(malloc_func(reinterpret_cast<void**>(&alloc_mem2), allocation_size, mempool.mempool(),
|
||||
stream.stream()));
|
||||
|
||||
int blocks = 1024;
|
||||
int blocks = 16;
|
||||
int clk_rate;
|
||||
hipMemPoolAttr attr;
|
||||
if (IsGfx11()) {
|
||||
|
||||
مرجع در شماره جدید
Block a user