Commit 42bc5b87 authored by one's avatar one
Browse files

Update dtk platform detection

parent 4599cd69
......@@ -28,7 +28,7 @@ def get_vendor(self):
if Path('/dev/kfd').is_char_device() and Path('/dev/dri').is_dir():
if not list(Path('/dev/dri').glob('renderD*')):
logger.warning('Cannot find AMD GPU device.')
if Path('/usr/local/hyhal').exists():
if Path('/usr/local/hyhal').exists() or Path('/opt/hyhal').exists():
return 'hygon'
return 'amd'
if list(Path(r'C:\Windows\System32').glob('*DriverStore/FileRepository/nv*.inf_amd64_*/nvapi64.dll')):
......
......@@ -44,6 +44,7 @@
- /dev/kfd
- /dev/dri
- /usr/local/hyhal
- /opt/hyhal
register: hygon_dev
- name: Set GPU Facts
set_fact:
......@@ -56,7 +57,8 @@
hygon_gpu_exist: >-
{{ (hygon_dev.results[0].stat.ischr is defined and hygon_dev.results[0].stat.ischr and
hygon_dev.results[1].stat.isdir is defined and hygon_dev.results[1].stat.isdir) and
hygon_dev.results[2].stat.exists is defined and hygon_dev.results[2].stat.exists }}
((hygon_dev.results[2].stat.exists is defined and hygon_dev.results[2].stat.exists) or
(hygon_dev.results[3].stat.exists is defined and hygon_dev.results[3].stat.exists)) }}
- name: Print GPU Checking Result
debug:
msg:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment