Cycles: Increase minimum supported HIP GPU driver
After the recent HIP SDK 6.3 update on Windows, the minimum GPU driver required to use HIP in Cycles has increased. This commit increases the required driver version listed in the UI and adds a check to avoid showing HIP devices if they're below a certain driver version number as they don't work properly. Pull Request: https://projects.blender.org/blender/blender/pulls/134965
This commit is contained in:
@@ -1769,13 +1769,16 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
||||
elif device_type == 'HIP':
|
||||
import sys
|
||||
if sys.platform[:3] == "win":
|
||||
driver_version = "21.Q4"
|
||||
adrenalin_driver_version = "24.6.1"
|
||||
pro_driver_version = "24.Q2"
|
||||
col.label(
|
||||
text=rpt_("Requires AMD GPU with RDNA architecture"),
|
||||
icon='BLANK1',
|
||||
translate=False)
|
||||
col.label(text=rpt_("and AMD Radeon Pro %s driver or newer") % driver_version,
|
||||
icon='BLANK1', translate=False)
|
||||
col.label(text=rpt_("and AMD Adrenalin driver %s or newer") %
|
||||
adrenalin_driver_version, icon='BLANK1', translate=False)
|
||||
col.label(text=rpt_("or AMD Radeon Pro %s driver or newer") %
|
||||
pro_driver_version, icon='BLANK1', translate=False)
|
||||
elif sys.platform.startswith("linux"):
|
||||
driver_version = "23.40"
|
||||
col.label(
|
||||
|
||||
@@ -38,9 +38,13 @@ bool device_hip_init()
|
||||
|
||||
initialized = true;
|
||||
int hipew_result = hipewInit(HIPEW_INIT_HIP);
|
||||
|
||||
if (hipew_result == HIPEW_SUCCESS) {
|
||||
VLOG_INFO << "HIPEW initialization succeeded";
|
||||
if (HIPDevice::have_precompiled_kernels()) {
|
||||
if (!hipSupportsDriver()) {
|
||||
VLOG_WARNING << "Driver version is too old";
|
||||
}
|
||||
else if (HIPDevice::have_precompiled_kernels()) {
|
||||
VLOG_INFO << "Found precompiled kernels";
|
||||
result = true;
|
||||
}
|
||||
@@ -60,7 +64,7 @@ bool device_hip_init()
|
||||
else if (hipew_result == HIPEW_ERROR_OLD_DRIVER) {
|
||||
VLOG_WARNING
|
||||
<< "HIPEW initialization failed: Driver version too old, requires AMD Radeon Pro "
|
||||
"21.Q4 driver or newer";
|
||||
"24.Q2 driver or newer";
|
||||
}
|
||||
else {
|
||||
VLOG_WARNING << "HIPEW initialization failed: Error opening HIP dynamic library";
|
||||
|
||||
@@ -42,8 +42,33 @@ int hipewCompilerVersion()
|
||||
{
|
||||
return (HIP_VERSION / 100) + (HIP_VERSION % 100 / 10);
|
||||
}
|
||||
# endif /* !WITH_HIP_DYNLOAD */
|
||||
|
||||
bool hipSupportsDriver()
|
||||
{
|
||||
# ifdef _WIN32
|
||||
# ifndef WITH_HIP_SDK_5
|
||||
/* This check is only neccesary if we're using HIP SDK 6 or newer. */
|
||||
int hip_driver_version = 0;
|
||||
hipError_t result = hipDriverGetVersion(&hip_driver_version);
|
||||
if (result != hipSuccess) {
|
||||
VLOG_WARNING << "Error getting driver version: " << hipewErrorString(result);
|
||||
return false;
|
||||
}
|
||||
|
||||
VLOG_DEBUG << "Detected HIP driver version: " << hip_driver_version;
|
||||
|
||||
if (hip_driver_version < 60140252) {
|
||||
/* Cycles crashes during rendering due to issues in older GPU drivers.
|
||||
* 60140252 corresponds to Adrenalin 24.6.1. */
|
||||
return false;
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
||||
#endif /* WITH_HIP */
|
||||
|
||||
@@ -47,7 +47,9 @@ class HIPContextScope {
|
||||
const char *hipewErrorString(hipError_t result);
|
||||
const char *hipewCompilerPath();
|
||||
int hipewCompilerVersion();
|
||||
# endif /* WITH_HIP_DYNLOAD */
|
||||
# endif /* !WITH_HIP_DYNLOAD */
|
||||
|
||||
bool hipSupportsDriver();
|
||||
|
||||
static std::string hipDeviceArch(const int hipDevId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user