pinokiod 5.1.22 → 5.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/shell.js +19 -8
- package/package.json +1 -1
package/kernel/shell.js
CHANGED
|
@@ -972,16 +972,27 @@ class Shell {
|
|
|
972
972
|
console.log(`Unsupported arch: os.arch()=${architecture}, process.arch=${armArchitecture}`)
|
|
973
973
|
}
|
|
974
974
|
|
|
975
|
-
const
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
975
|
+
const compiler_log = '"%TEMP%\\pinokio-vs.log"'
|
|
976
|
+
const activate_root = this.kernel.bin.path("miniconda/etc/conda/activate.d")
|
|
977
|
+
const compiler_candidates = [
|
|
978
|
+
path.resolve(activate_root, "pinokio", "vs2019_compiler_vars.bat"),
|
|
979
|
+
path.resolve(activate_root, "pinokio", "vs2022_compiler_vars.bat"),
|
|
980
|
+
path.resolve(activate_root, "vs2019_compiler_vars.bat"),
|
|
981
|
+
path.resolve(activate_root, "vs2022_compiler_vars.bat"),
|
|
980
982
|
]
|
|
981
|
-
|
|
982
|
-
|
|
983
|
+
let compiler_script = null
|
|
984
|
+
for (const candidate of compiler_candidates) {
|
|
985
|
+
if (await this.exists(candidate)) {
|
|
986
|
+
compiler_script = candidate
|
|
987
|
+
break
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
if (compiler_script) {
|
|
991
|
+
conda_activation.push(`CALL "${compiler_script}" > ${compiler_log} 2>&1`)
|
|
992
|
+
} else if (vcvars_path && arg) {
|
|
993
|
+
conda_activation.push(`CALL "${vcvars_path}" ${arg} > ${compiler_log} 2>&1`)
|
|
983
994
|
}
|
|
984
|
-
conda_activation.push(
|
|
995
|
+
conda_activation.push("@echo off")
|
|
985
996
|
conda_activation.push("set TORCH_CUDA_ARCH_LIST=")
|
|
986
997
|
conda_activation.push("set CUDAARCHS=")
|
|
987
998
|
} catch (e) {
|