Benchmarks - Add support for DirectX GPU platform (#536)
**Description** Add support for DirectX GPU platform. **Major Revision** - Add DirectX platform for benchmark registry - Add gpu_vendor identify for AMD and NVIDIA with win driver
This commit is contained in:
Родитель
e909ddd0ca
Коммит
bbb0e24342
|
@ -24,6 +24,7 @@ class Platform(Enum):
|
|||
CPU = 'CPU'
|
||||
CUDA = 'CUDA'
|
||||
ROCM = 'ROCm'
|
||||
DIRECTX = 'DirectX'
|
||||
|
||||
|
||||
class Framework(Enum):
|
||||
|
|
|
@ -29,6 +29,10 @@ class GPU():
|
|||
if not list(Path('/dev/dri').glob('card*')):
|
||||
logger.warning('Cannot find AMD GPU device.')
|
||||
return 'amd'
|
||||
if list(Path(r'C:\Windows\System32').glob('*DriverStore/FileRepository/nv*.inf_amd64_*/nvapi64.dll')):
|
||||
return 'nvidia-graphics'
|
||||
if list(Path(r'C:\Windows\System32').glob('*DriverStore/FileRepository/u*.inf_amd64_*/*/aticfx64.dll')):
|
||||
return 'amd-graphics'
|
||||
return None
|
||||
|
||||
@property
|
||||
|
|
|
@ -87,6 +87,8 @@ class SuperBenchExecutor():
|
|||
return Platform.CUDA
|
||||
elif gpu.vendor == 'amd':
|
||||
return Platform.ROCM
|
||||
elif gpu.vendor == 'amd-graphics' or gpu.vendor == 'nvidia-graphics':
|
||||
return Platform.DIRECTX
|
||||
except Exception as e:
|
||||
logger.error(e)
|
||||
return Platform.CPU
|
||||
|
|
Загрузка…
Ссылка в новой задаче