mirror of
https://github.com/facefusion/facefusion.git
synced 2026-08-18 06:47:13 +02:00
giving up - set driver to 0.0.0 for amd
This commit is contained in:
@@ -22,21 +22,6 @@ def create_static_library() -> Optional[ctypes.CDLL]:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def define_driver_version() -> ctypes.Structure:
|
|
||||||
return type('AMDSMI_VERSION', (ctypes.Structure,),
|
|
||||||
{
|
|
||||||
'_pack_': 1,
|
|
||||||
'_fields_':
|
|
||||||
[
|
|
||||||
('major', ctypes.c_uint32),
|
|
||||||
('minor', ctypes.c_uint32),
|
|
||||||
('release', ctypes.c_uint32),
|
|
||||||
('padding', ctypes.c_ubyte * 4),
|
|
||||||
('build', ctypes.POINTER(ctypes.c_char))
|
|
||||||
]
|
|
||||||
})()
|
|
||||||
|
|
||||||
|
|
||||||
def define_product_info() -> ctypes.Structure:
|
def define_product_info() -> ctypes.Structure:
|
||||||
return type('AMDSMI_ASIC_INFO', (ctypes.Structure,),
|
return type('AMDSMI_ASIC_INFO', (ctypes.Structure,),
|
||||||
{
|
{
|
||||||
@@ -94,9 +79,6 @@ def init_ctypes(amd_smi : ctypes.CDLL) -> ctypes.CDLL:
|
|||||||
amd_smi.amdsmi_shut_down.argtypes = []
|
amd_smi.amdsmi_shut_down.argtypes = []
|
||||||
amd_smi.amdsmi_shut_down.restype = ctypes.c_uint32
|
amd_smi.amdsmi_shut_down.restype = ctypes.c_uint32
|
||||||
|
|
||||||
amd_smi.amdsmi_get_lib_version.argtypes = [ ctypes.c_void_p ]
|
|
||||||
amd_smi.amdsmi_get_lib_version.restype = ctypes.c_uint32
|
|
||||||
|
|
||||||
amd_smi.amdsmi_get_socket_handles.argtypes = [ ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_void_p) ]
|
amd_smi.amdsmi_get_socket_handles.argtypes = [ ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_void_p) ]
|
||||||
amd_smi.amdsmi_get_socket_handles.restype = ctypes.c_uint32
|
amd_smi.amdsmi_get_socket_handles.restype = ctypes.c_uint32
|
||||||
|
|
||||||
|
|||||||
@@ -123,9 +123,6 @@ def detect_amd_graphic_devices() -> List[GraphicDevice]:
|
|||||||
if amd_smi_library:
|
if amd_smi_library:
|
||||||
amd_smi_library.amdsmi_init(ctypes.c_uint64(2))
|
amd_smi_library.amdsmi_init(ctypes.c_uint64(2))
|
||||||
|
|
||||||
driver_version = amd_smi_module.define_driver_version()
|
|
||||||
amd_smi_library.amdsmi_get_lib_version(ctypes.byref(driver_version))
|
|
||||||
|
|
||||||
rocm_core_library = rocm_core_module.create_static_library()
|
rocm_core_library = rocm_core_module.create_static_library()
|
||||||
rocm_major_version = ctypes.c_uint()
|
rocm_major_version = ctypes.c_uint()
|
||||||
rocm_minor_version = ctypes.c_uint()
|
rocm_minor_version = ctypes.c_uint()
|
||||||
@@ -149,7 +146,7 @@ def detect_amd_graphic_devices() -> List[GraphicDevice]:
|
|||||||
|
|
||||||
graphic_devices.append(
|
graphic_devices.append(
|
||||||
{
|
{
|
||||||
'driver_version': str(driver_version.major) + '.' + str(driver_version.minor) + '.' + str(driver_version.release),
|
'driver_version': '0.0.0',
|
||||||
'framework':
|
'framework':
|
||||||
{
|
{
|
||||||
'name': 'ROCm',
|
'name': 'ROCm',
|
||||||
|
|||||||
Reference in New Issue
Block a user