@@ -425,20 +425,21 @@ MT_TEST(acl_usm, buffer_location_usm) {
425
425
CHECK_EQUAL (CL_SUCCESS, status);
426
426
CHECK_EQUAL (0 , read_mem_id);
427
427
CHECK_EQUAL (sizeof (cl_uint), ret_size);
428
- // Check when given pointer is invalid
429
- status = clGetMemAllocInfoINTEL (m_context, NULL ,
428
+
429
+ status = clMemFreeINTEL (m_context, test_ptr);
430
+ ACL_LOCKED (CHECK_EQUAL (acl_usm_ptr_belongs_to_context (m_context, test_ptr),
431
+ CL_FALSE));
432
+ CHECK (m_context->usm_allocation .empty ());
433
+
434
+ // Check when given pointer is already freed
435
+ status = clGetMemAllocInfoINTEL (m_context, test_ptr,
430
436
CL_MEM_ALLOC_BUFFER_LOCATION_INTEL,
431
437
sizeof (cl_uint), &read_mem_id, &ret_size);
432
438
433
439
CHECK_EQUAL (CL_SUCCESS, status);
434
440
CHECK_EQUAL (0 , read_mem_id);
435
441
CHECK_EQUAL (sizeof (cl_uint), ret_size);
436
-
437
- status = clMemFreeINTEL (m_context, test_ptr);
438
442
CHECK_EQUAL (status, CL_SUCCESS);
439
- ACL_LOCKED (CHECK_EQUAL (acl_usm_ptr_belongs_to_context (m_context, test_ptr),
440
- CL_FALSE));
441
- CHECK (m_context->usm_allocation .empty ());
442
443
443
444
ACL_LOCKED (acl_print_debug_msg (" end buffer_location_usm\n " ));
444
445
}
0 commit comments