Merge 'develop' into 'amd-staging'
Change-Id: I8e44bfc2acb443446e379b969e5106a663ce645d
[ROCm/hip-tests commit: eb1b9d8ebb]
This commit is contained in:
@@ -8,7 +8,18 @@
|
|||||||
"Unit_BuiltinAtomicsRTC_fmaxCoherentGlobalMem",
|
"Unit_BuiltinAtomicsRTC_fmaxCoherentGlobalMem",
|
||||||
"Unit_BuiltinAtomicsRTC__fminCoherentGlobalMem",
|
"Unit_BuiltinAtomicsRTC__fminCoherentGlobalMem",
|
||||||
"Unit_BuiltInAtomicAdd_CoherentGlobalMemWithRtc",
|
"Unit_BuiltInAtomicAdd_CoherentGlobalMemWithRtc",
|
||||||
"Unit_hipMemGetAddressRange_Negative"
|
"Unit_hipMemGetAddressRange_Negative",
|
||||||
|
"Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Positive_Read_Write",
|
||||||
|
"Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Negative_Parameters",
|
||||||
|
"Unit_hipImportExternalMemory_Vulkan_Negative_Parameters",
|
||||||
|
"Unit_hipWaitExternalSemaphoresAsync_Vulkan_Positive_Binary_Semaphore",
|
||||||
|
"Unit_hipWaitExternalSemaphoresAsync_Vulkan_Positive_Multiple_Semaphores",
|
||||||
|
"Unit_hipWaitExternalSemaphoresAsync_Vulkan_Negative_Parameters",
|
||||||
|
"Unit_hipSignalExternalSemaphoresAsync_Vulkan_Positive_Binary_Semaphore",
|
||||||
|
"Unit_hipSignalExternalSemaphoresAsync_Vulkan_Positive_Multiple_Semaphores",
|
||||||
|
"Unit_hipSignalExternalSemaphoresAsync_Vulkan_Negative_Parameters",
|
||||||
|
"Unit_hipImportExternalSemaphore_Vulkan_Negative_Parameters",
|
||||||
|
"Unit_hipDestroyExternalSemaphore_Vulkan_Negative_Parameters"
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,9 +141,9 @@ static void initHipCtx(hipCtx_t* pcontext) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline bool IsGfx11() {
|
static inline bool IsGfx11() {
|
||||||
#if defined(HT_NVIDIA)
|
#if HT_NVIDIA
|
||||||
return false;
|
return false;
|
||||||
#elif defined(HT_AMD)
|
#elif HT_AMD
|
||||||
int device = -1;
|
int device = -1;
|
||||||
hipDeviceProp_t props{};
|
hipDeviceProp_t props{};
|
||||||
HIP_CHECK(hipGetDevice(&device));
|
HIP_CHECK(hipGetDevice(&device));
|
||||||
|
|||||||
@@ -148,10 +148,10 @@ TEST_CASE("Unit_hipMemAdvise_Rounding") {
|
|||||||
unsigned int attribute = 0;
|
unsigned int attribute = 0;
|
||||||
HIP_CHECK(hipMemRangeGetAttribute(&attribute, sizeof(attribute), hipMemRangeAttributeAccessedBy,
|
HIP_CHECK(hipMemRangeGetAttribute(&attribute, sizeof(attribute), hipMemRangeAttributeAccessedBy,
|
||||||
reinterpret_cast<void*>(base), rounded_up));
|
reinterpret_cast<void*>(base), rounded_up));
|
||||||
REQUIRE(device == attribute);
|
REQUIRE(device == static_cast<int>(attribute));
|
||||||
HIP_CHECK(hipMemRangeGetAttribute(&attribute, sizeof(attribute), hipMemRangeAttributeAccessedBy,
|
HIP_CHECK(hipMemRangeGetAttribute(&attribute, sizeof(attribute), hipMemRangeAttributeAccessedBy,
|
||||||
alloc.ptr(), 3 * kPageSize));
|
alloc.ptr(), 3 * kPageSize));
|
||||||
REQUIRE((rounded_up == 3 * kPageSize ? device : hipInvalidDeviceId) == attribute);
|
REQUIRE((rounded_up == 3 * kPageSize ? device : hipInvalidDeviceId) == static_cast<int>(attribute));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("Unit_hipMemAdvise_Flags_Do_Not_Cause_Prefetch") {
|
TEST_CASE("Unit_hipMemAdvise_Flags_Do_Not_Cause_Prefetch") {
|
||||||
@@ -193,7 +193,7 @@ TEST_CASE("Unit_hipMemAdvise_Read_Write_After_Advise") {
|
|||||||
|
|
||||||
std::fill_n(alloc.ptr(), count, -1);
|
std::fill_n(alloc.ptr(), count, -1);
|
||||||
ArrayFindIfNot(alloc.ptr(), -1, count);
|
ArrayFindIfNot(alloc.ptr(), -1, count);
|
||||||
for (int i = 0; i < supported_devices.size(); ++i) {
|
for (int i = 0; i < static_cast<int>(supported_devices.size()); ++i) {
|
||||||
HIP_CHECK(hipSetDevice(supported_devices[i]));
|
HIP_CHECK(hipSetDevice(supported_devices[i]));
|
||||||
VectorIncrement<<<count / 1024 + 1, 1024>>>(alloc.ptr(), 1, count);
|
VectorIncrement<<<count / 1024 + 1, 1024>>>(alloc.ptr(), 1, count);
|
||||||
HIP_CHECK(hipGetLastError());
|
HIP_CHECK(hipGetLastError());
|
||||||
|
|||||||
@@ -213,12 +213,10 @@ TEST_CASE("Unit_hipPointerGetAttributes_Basic") {
|
|||||||
|
|
||||||
char* A_d;
|
char* A_d;
|
||||||
char* A_Pinned_h;
|
char* A_Pinned_h;
|
||||||
char* A_OSAlloc_h;
|
|
||||||
hipError_t e;
|
hipError_t e;
|
||||||
|
|
||||||
HIP_CHECK(hipMalloc(&A_d, Nbytes));
|
HIP_CHECK(hipMalloc(&A_d, Nbytes));
|
||||||
HIP_CHECK(hipHostMalloc(reinterpret_cast<void**>(&A_Pinned_h), Nbytes, hipHostMallocDefault));
|
HIP_CHECK(hipHostMalloc(reinterpret_cast<void**>(&A_Pinned_h), Nbytes, hipHostMallocDefault));
|
||||||
A_OSAlloc_h = reinterpret_cast<char*>(malloc(Nbytes));
|
|
||||||
|
|
||||||
size_t free, total;
|
size_t free, total;
|
||||||
HIP_CHECK(hipMemGetInfo(&free, &total));
|
HIP_CHECK(hipMemGetInfo(&free, &total));
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
#include "vulkan_test.hh"
|
#include "vulkan_test.hh"
|
||||||
|
|
||||||
|
#if HT_AMD && 0
|
||||||
constexpr bool enable_validation = false;
|
constexpr bool enable_validation = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
TEST_CASE("Unit_hipDestroyExternalMemory_Vulkan_Negative_Parameters") {
|
TEST_CASE("Unit_hipDestroyExternalMemory_Vulkan_Negative_Parameters") {
|
||||||
SECTION("extMem == nullptr") {
|
SECTION("extMem == nullptr") {
|
||||||
|
|||||||
@@ -112,7 +112,9 @@ TEST_CASE("Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Negative_Parameters") {
|
|||||||
|
|
||||||
hipExternalMemoryBufferDesc external_mem_buffer_desc = {};
|
hipExternalMemoryBufferDesc external_mem_buffer_desc = {};
|
||||||
external_mem_buffer_desc.size = vk_storage.size;
|
external_mem_buffer_desc.size = vk_storage.size;
|
||||||
|
#if HT_NVIDIA
|
||||||
void* hip_dev_ptr = nullptr;
|
void* hip_dev_ptr = nullptr;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Disabled on AMD due to defect - EXSWHTEC-176
|
// Disabled on AMD due to defect - EXSWHTEC-176
|
||||||
#if HT_NVIDIA
|
#if HT_NVIDIA
|
||||||
|
|||||||
@@ -25,9 +25,11 @@ constexpr bool enable_validation = false;
|
|||||||
|
|
||||||
TEST_CASE("Unit_hipImportExternalMemory_Vulkan_Negative_Parameters") {
|
TEST_CASE("Unit_hipImportExternalMemory_Vulkan_Negative_Parameters") {
|
||||||
VulkanTest vkt(enable_validation);
|
VulkanTest vkt(enable_validation);
|
||||||
|
#if HT_NVIDIA
|
||||||
const auto storage = vkt.CreateMappedStorage<int>(1, VK_BUFFER_USAGE_TRANSFER_DST_BIT, true);
|
const auto storage = vkt.CreateMappedStorage<int>(1, VK_BUFFER_USAGE_TRANSFER_DST_BIT, true);
|
||||||
auto desc = vkt.BuildMemoryDescriptor(storage.memory, sizeof(*storage.host_ptr));
|
auto desc = vkt.BuildMemoryDescriptor(storage.memory, sizeof(*storage.host_ptr));
|
||||||
hipExternalMemory_t ext_memory;
|
hipExternalMemory_t ext_memory;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Disabled due to defect - EXSWHTEC-182
|
// Disabled due to defect - EXSWHTEC-182
|
||||||
#if HT_NVIDIA
|
#if HT_NVIDIA
|
||||||
|
|||||||
Reference in New Issue
Block a user