From 5e884983df28b891b29a2021dd1eda61ab838434 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Tue, 1 Oct 2024 21:43:32 +0200 Subject: [PATCH 1/2] Fix Apple Intel --- install.js | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/install.js b/install.js index a0df4c1..8b28557 100644 --- a/install.js +++ b/install.js @@ -4,22 +4,19 @@ function install(kernel) { const { platform, gpu } = kernel; - if (gpu === 'amd') + if (platform === 'linux' && gpu === 'amd') { - if (platform === 'linux') - { - return 'python install.py --onnxruntime rocm'; - } - if (platform === 'win32') - { - return 'python install.py --onnxruntime directml'; - } + return 'python install.py --onnxruntime rocm'; } - if (gpu === 'intel') + if (platform === 'win32' && gpu === 'amd') + { + return 'python install.py --onnxruntime directml'; + } + if (platform === 'win32' && gpu === 'intel') { return 'python install.py --onnxruntime openvino'; } - if (gpu === 'nvidia') + if ((platform === 'linux' || platform === 'win32') && gpu === 'nvidia') { return 'python install.py --onnxruntime cuda'; } @@ -40,7 +37,7 @@ module.exports = async kernel => } }, { - when: '{{ gpu === "intel" }}', + when: '{{ (platform === "linux" || platform === "win32") && gpu === "intel" }}', method: 'shell.run', params: { @@ -52,7 +49,7 @@ module.exports = async kernel => } }, { - when: '{{ gpu === "nvidia" }}', + when: '{{ (platform === "linux" || platform === "win32") && gpu === "nvidia" }}', method: 'shell.run', params: { From 627d480403a797f4fb2377f159da06540eac2ad7 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Tue, 1 Oct 2024 21:50:38 +0200 Subject: [PATCH 2/2] Fix Apple Intel --- install.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.js b/install.js index 8b28557..1608304 100644 --- a/install.js +++ b/install.js @@ -12,7 +12,7 @@ function install(kernel) { return 'python install.py --onnxruntime directml'; } - if (platform === 'win32' && gpu === 'intel') + if ((platform === 'linux' || platform === 'win32') && gpu === 'intel') { return 'python install.py --onnxruntime openvino'; }