SWDEV-1 - Merge github PRs to amd-staging

Change-Id: I2944a63ddc2eec8dc1403d9790ffffbaec343385
Bu işleme şunda yer alıyor:
Rakesh Roy
2024-03-04 11:51:34 +05:30
işleme 57bc68acb1
366 değiştirilmiş dosya ile 55399 ekleme ve 2073 silme
+16 -16
Dosyayı Görüntüle
@@ -88,32 +88,32 @@ template <ExtModuleLaunchKernelSig* func> void ModuleLaunchKernelPositiveParamet
};
SECTION("gridDimX == maxGridDimX") {
const unsigned int x = GetDeviceAttribute(0, hipDeviceAttributeMaxGridDimX);
const unsigned int x = GetDeviceAttribute(hipDeviceAttributeMaxGridDimX, 0);
LaunchNOPKernel(x, 1, 1, 1, 1, 1);
}
SECTION("gridDimY == maxGridDimY") {
const unsigned int y = GetDeviceAttribute(0, hipDeviceAttributeMaxGridDimY);
const unsigned int y = GetDeviceAttribute(hipDeviceAttributeMaxGridDimY, 0);
LaunchNOPKernel(1, y, 1, 1, 1, 1);
}
SECTION("gridDimZ == maxGridDimZ") {
const unsigned int z = GetDeviceAttribute(0, hipDeviceAttributeMaxGridDimZ);
const unsigned int z = GetDeviceAttribute(hipDeviceAttributeMaxGridDimZ, 0);
LaunchNOPKernel(1, 1, z, 1, 1, 1);
}
SECTION("blockDimX == maxBlockDimX") {
const unsigned int x = GetDeviceAttribute(0, hipDeviceAttributeMaxBlockDimX);
const unsigned int x = GetDeviceAttribute(hipDeviceAttributeMaxBlockDimX, 0);
LaunchNOPKernel(1, 1, 1, x, 1, 1);
}
SECTION("blockDimY == maxBlockDimY") {
const unsigned int y = GetDeviceAttribute(0, hipDeviceAttributeMaxBlockDimY);
const unsigned int y = GetDeviceAttribute(hipDeviceAttributeMaxBlockDimY, 0);
LaunchNOPKernel(1, 1, 1, 1, y, 1);
}
SECTION("blockDimZ == maxBlockDimZ") {
const unsigned int z = GetDeviceAttribute(0, hipDeviceAttributeMaxBlockDimZ);
const unsigned int z = GetDeviceAttribute(hipDeviceAttributeMaxBlockDimZ, 0);
LaunchNOPKernel(1, 1, 1, 1, 1, z);
}
}
@@ -163,19 +163,19 @@ template <ExtModuleLaunchKernelSig* func> void ModuleLaunchKernelNegativeParamet
// Disabled on AMD due to defect - EXSWHTEC-158
#if HT_NVIDIA
SECTION("gridDimX > maxGridDimX") {
const unsigned int x = GetDeviceAttribute(0, hipDeviceAttributeMaxGridDimX) + 1u;
const unsigned int x = GetDeviceAttribute(hipDeviceAttributeMaxGridDimX, 0) + 1u;
HIP_CHECK_ERROR(func(f, x, 1, 1, 1, 1, 1, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0u),
hipErrorInvalidValue);
}
SECTION("gridDimY > maxGridDimY") {
const unsigned int y = GetDeviceAttribute(0, hipDeviceAttributeMaxGridDimY) + 1u;
const unsigned int y = GetDeviceAttribute(hipDeviceAttributeMaxGridDimY, 0) + 1u;
HIP_CHECK_ERROR(func(f, 1, y, 1, 1, 1, 1, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0u),
hipErrorInvalidValue);
}
SECTION("gridDimZ > maxGridDimZ") {
const unsigned int z = GetDeviceAttribute(0, hipDeviceAttributeMaxGridDimZ) + 1u;
const unsigned int z = GetDeviceAttribute(hipDeviceAttributeMaxGridDimZ, 0) + 1u;
HIP_CHECK_ERROR(func(f, 1, 1, z, 1, 1, 1, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0u),
hipErrorInvalidValue);
}
@@ -184,19 +184,19 @@ template <ExtModuleLaunchKernelSig* func> void ModuleLaunchKernelNegativeParamet
// Disabled on AMD due to defect - EXSWHTEC-156
#if HT_NVIDIA
SECTION("blockDimX > maxBlockDimX") {
const unsigned int x = GetDeviceAttribute(0, hipDeviceAttributeMaxBlockDimX) + 1u;
const unsigned int x = GetDeviceAttribute(hipDeviceAttributeMaxBlockDimX, 0) + 1u;
HIP_CHECK_ERROR(func(f, 1, 1, 1, x, 1, 1, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0u),
hipErrorInvalidValue);
}
SECTION("blockDimY > maxBlockDimY") {
const unsigned int y = GetDeviceAttribute(0, hipDeviceAttributeMaxBlockDimY) + 1u;
const unsigned int y = GetDeviceAttribute(hipDeviceAttributeMaxBlockDimY, 0) + 1u;
HIP_CHECK_ERROR(func(f, 1, 1, 1, 1, y, 1, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0u),
hipErrorInvalidValue);
}
SECTION("blockDimZ > maxBlockDimZ") {
const unsigned int z = GetDeviceAttribute(0, hipDeviceAttributeMaxBlockDimZ) + 1u;
const unsigned int z = GetDeviceAttribute(hipDeviceAttributeMaxBlockDimZ, 0) + 1u;
HIP_CHECK_ERROR(func(f, 1, 1, 1, 1, 1, z, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0u),
hipErrorInvalidValue);
}
@@ -205,7 +205,7 @@ template <ExtModuleLaunchKernelSig* func> void ModuleLaunchKernelNegativeParamet
// Disabled on AMD due to defect - EXSWHTEC-162
#if HT_NVIDIA
SECTION("blockDimX * blockDimY * blockDimZ > MaxThreadsPerBlock") {
const unsigned int max = GetDeviceAttribute(0, hipDeviceAttributeMaxThreadsPerBlock);
const unsigned int max = GetDeviceAttribute(hipDeviceAttributeMaxThreadsPerBlock, 0);
const unsigned int dim = std::ceil(std::cbrt(max)) + 1;
HIP_CHECK_ERROR(
func(f, 1, 1, 1, dim, dim, dim, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0u),
@@ -216,7 +216,7 @@ template <ExtModuleLaunchKernelSig* func> void ModuleLaunchKernelNegativeParamet
// Disabled on AMD due to defect - EXSWHTEC-159
#if HT_NVIDIA
SECTION("sharedMemBytes > max shared memory per block") {
const unsigned int max = GetDeviceAttribute(0, hipDeviceAttributeMaxSharedMemoryPerBlock) + 1u;
const unsigned int max = GetDeviceAttribute(hipDeviceAttributeMaxSharedMemoryPerBlock, 0) + 1u;
HIP_CHECK_ERROR(func(f, 1, 1, 1, 1, 1, 1, max, nullptr, nullptr, nullptr, nullptr, nullptr, 0u),
hipErrorInvalidValue);
}
@@ -241,8 +241,8 @@ template <ExtModuleLaunchKernelSig* func> void ModuleLaunchKernelNegativeParamet
void* kernel_args[1] = {&result_ptr};
// clang-format off
void *extra[] = {
HIP_LAUNCH_PARAM_BUFFER_POINTER, &result_ptr,
HIP_LAUNCH_PARAM_BUFFER_SIZE, &size,
HIP_LAUNCH_PARAM_BUFFER_POINTER, &result_ptr,
HIP_LAUNCH_PARAM_BUFFER_SIZE, &size,
HIP_LAUNCH_PARAM_END
};
// clang-format on