pinokiod 5.1.23 → 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 +17 -8
- package/package.json +1 -1
package/kernel/shell.js
CHANGED
|
@@ -973,16 +973,25 @@ class Shell {
|
|
|
973
973
|
}
|
|
974
974
|
|
|
975
975
|
const compiler_log = '"%TEMP%\\pinokio-vs.log"'
|
|
976
|
-
const
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
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"),
|
|
981
982
|
]
|
|
982
|
-
|
|
983
|
-
|
|
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`)
|
|
984
994
|
}
|
|
985
|
-
conda_activation.push(compiler_cmd.join(" "))
|
|
986
995
|
conda_activation.push("@echo off")
|
|
987
996
|
conda_activation.push("set TORCH_CUDA_ARCH_LIST=")
|
|
988
997
|
conda_activation.push("set CUDAARCHS=")
|