onnxruntime-node 1.17.3 → 1.18.0-dev.20240430-204f1f59b9
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/__commit.txt +1 -0
- package/bin/napi-v3/darwin/arm64/{libonnxruntime.1.17.3.dylib → libonnxruntime.1.18.0.dylib} +0 -0
- package/bin/napi-v3/darwin/arm64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/darwin/x64/{libonnxruntime.1.17.3.dylib → libonnxruntime.1.18.0.dylib} +0 -0
- package/bin/napi-v3/darwin/x64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/linux/arm64/{libonnxruntime.so.1.17.3 → libonnxruntime.so.1.18.0} +0 -0
- package/bin/napi-v3/linux/arm64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/linux/x64/{libonnxruntime.so.1.17.3 → libonnxruntime.so.1.18.0} +0 -0
- package/bin/napi-v3/linux/x64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/win32/arm64/DirectML.dll +0 -0
- package/bin/napi-v3/win32/arm64/onnxruntime.dll +0 -0
- package/bin/napi-v3/win32/arm64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/win32/x64/DirectML.dll +0 -0
- package/bin/napi-v3/win32/x64/onnxruntime.dll +0 -0
- package/bin/napi-v3/win32/x64/onnxruntime_binding.node +0 -0
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/lib/version.ts +1 -1
- package/package.json +2 -2
- package/script/build.js +5 -0
- package/script/build.ts +5 -0
- package/script/install.js +19 -11
package/__commit.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
204f1f59b9b351954a1106def4ce6ad9e840fa9f
|
package/bin/napi-v3/darwin/arm64/{libonnxruntime.1.17.3.dylib → libonnxruntime.1.18.0.dylib}
RENAMED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/version.js
CHANGED
|
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.version = void 0;
|
|
6
6
|
// This file is generated by /js/scripts/update-version.ts
|
|
7
7
|
// Do not modify file content manually.
|
|
8
|
-
exports.version = '1.
|
|
8
|
+
exports.version = '1.18.0-dev.20240430-204f1f59b9';
|
|
9
9
|
//# sourceMappingURL=version.js.map
|
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../lib/version.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,kCAAkC;;;AAElC,0DAA0D;AAC1D,uCAAuC;AAE1B,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../lib/version.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,kCAAkC;;;AAElC,0DAA0D;AAC1D,uCAAuC;AAE1B,QAAA,OAAO,GAAG,gCAAgC,CAAC"}
|
package/lib/version.ts
CHANGED
package/package.json
CHANGED
package/script/build.js
CHANGED
|
@@ -47,6 +47,8 @@ if (ARCH !== 'x64' && ARCH !== 'ia32' && ARCH !== 'arm64' && ARCH !== 'arm') {
|
|
|
47
47
|
}
|
|
48
48
|
// --onnxruntime-build-dir=
|
|
49
49
|
const ONNXRUNTIME_BUILD_DIR = buildArgs['onnxruntime-build-dir'];
|
|
50
|
+
// --onnxruntime-generator=
|
|
51
|
+
const ONNXRUNTIME_GENERATOR = buildArgs['onnxruntime-generator'];
|
|
50
52
|
// --rebuild
|
|
51
53
|
const REBUILD = !!buildArgs.rebuild;
|
|
52
54
|
// --use_dml
|
|
@@ -76,6 +78,9 @@ const args = [
|
|
|
76
78
|
if (ONNXRUNTIME_BUILD_DIR && typeof ONNXRUNTIME_BUILD_DIR === 'string') {
|
|
77
79
|
args.push(`--CDONNXRUNTIME_BUILD_DIR=${ONNXRUNTIME_BUILD_DIR}`);
|
|
78
80
|
}
|
|
81
|
+
if (ONNXRUNTIME_GENERATOR && typeof ONNXRUNTIME_GENERATOR === 'string') {
|
|
82
|
+
args.push(`--CDONNXRUNTIME_GENERATOR=${ONNXRUNTIME_GENERATOR}`);
|
|
83
|
+
}
|
|
79
84
|
if (USE_DML) {
|
|
80
85
|
args.push('--CDUSE_DML=ON');
|
|
81
86
|
}
|
package/script/build.ts
CHANGED
|
@@ -23,6 +23,8 @@ if (ARCH !== 'x64' && ARCH !== 'ia32' && ARCH !== 'arm64' && ARCH !== 'arm') {
|
|
|
23
23
|
}
|
|
24
24
|
// --onnxruntime-build-dir=
|
|
25
25
|
const ONNXRUNTIME_BUILD_DIR = buildArgs['onnxruntime-build-dir'];
|
|
26
|
+
// --onnxruntime-generator=
|
|
27
|
+
const ONNXRUNTIME_GENERATOR = buildArgs['onnxruntime-generator'];
|
|
26
28
|
// --rebuild
|
|
27
29
|
const REBUILD = !!buildArgs.rebuild;
|
|
28
30
|
// --use_dml
|
|
@@ -55,6 +57,9 @@ const args = [
|
|
|
55
57
|
if (ONNXRUNTIME_BUILD_DIR && typeof ONNXRUNTIME_BUILD_DIR === 'string') {
|
|
56
58
|
args.push(`--CDONNXRUNTIME_BUILD_DIR=${ONNXRUNTIME_BUILD_DIR}`);
|
|
57
59
|
}
|
|
60
|
+
if (ONNXRUNTIME_GENERATOR && typeof ONNXRUNTIME_GENERATOR === 'string') {
|
|
61
|
+
args.push(`--CDONNXRUNTIME_GENERATOR=${ONNXRUNTIME_GENERATOR}`);
|
|
62
|
+
}
|
|
58
63
|
if (USE_DML) {
|
|
59
64
|
args.push('--CDUSE_DML=ON');
|
|
60
65
|
}
|
package/script/install.js
CHANGED
|
@@ -29,6 +29,8 @@ const {Readable} = require('stream');
|
|
|
29
29
|
// --onnxruntime-node-install-cuda=v12 Force install the CUDA EP binaries for CUDA 12.
|
|
30
30
|
// --onnxruntime-node-install-cuda=skip Skip the installation of the CUDA EP binaries.
|
|
31
31
|
//
|
|
32
|
+
// Alternatively, use environment variable "ONNXRUNTIME_NODE_INSTALL_CUDA"
|
|
33
|
+
//
|
|
32
34
|
// If the flag is not provided, the script will only install the CUDA EP binaries when:
|
|
33
35
|
// - The platform is Linux/x64.
|
|
34
36
|
// - The binaries are not already present in the package.
|
|
@@ -58,7 +60,7 @@ if (NO_INSTALL || !shouldInstall) {
|
|
|
58
60
|
const artifactUrl = {
|
|
59
61
|
11: `https://github.com/microsoft/onnxruntime/releases/download/v${ORT_VERSION}/onnxruntime-linux-x64-gpu-${
|
|
60
62
|
ORT_VERSION}.tgz`,
|
|
61
|
-
12: `https://github.com/microsoft/onnxruntime/releases/download/v${ORT_VERSION}/onnxruntime-linux-x64-cuda12-${
|
|
63
|
+
12: `https://github.com/microsoft/onnxruntime/releases/download/v${ORT_VERSION}/onnxruntime-linux-x64-gpu-cuda12-${
|
|
62
64
|
ORT_VERSION}.tgz`
|
|
63
65
|
}[INSTALL_CUDA_FLAG || tryGetCudaVersion()];
|
|
64
66
|
console.log(`Downloading "${artifactUrl}"...`);
|
|
@@ -79,15 +81,19 @@ Use "--onnxruntime-node-install-cuda=skip" to skip the installation. You will st
|
|
|
79
81
|
]);
|
|
80
82
|
|
|
81
83
|
Readable.fromWeb(res.body)
|
|
82
|
-
.pipe(tar.t(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
.pipe(tar.t({
|
|
85
|
+
strict: true,
|
|
86
|
+
onentry: (entry) => {
|
|
87
|
+
const filename = path.basename(entry.path);
|
|
88
|
+
if (entry.type === 'File' && FILES.has(filename)) {
|
|
89
|
+
console.log(`Extracting "${filename}" to "${BIN_FOLDER}"...`);
|
|
90
|
+
entry.pipe(fs.createWriteStream(path.join(BIN_FOLDER, filename)));
|
|
91
|
+
entry.on('finish', () => {
|
|
92
|
+
console.log(`Finished extracting "${filename}".`);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}))
|
|
91
97
|
.on('error', (err) => {
|
|
92
98
|
throw new Error(`Failed to extract the binaries: ${err.message}.
|
|
93
99
|
|
|
@@ -105,7 +111,7 @@ function tryGetCudaVersion() {
|
|
|
105
111
|
}
|
|
106
112
|
|
|
107
113
|
function parseInstallCudaFlag() {
|
|
108
|
-
let flag = process.env.npm_config_onnxruntime_node_install_cuda;
|
|
114
|
+
let flag = process.env.ONNXRUNTIME_NODE_INSTALL_CUDA || process.env.npm_config_onnxruntime_node_install_cuda;
|
|
109
115
|
if (!flag) {
|
|
110
116
|
for (let i = 0; i < process.argv.length; i++) {
|
|
111
117
|
if (process.argv[i].startsWith('--onnxruntime-node-install-cuda=')) {
|
|
@@ -118,6 +124,8 @@ function parseInstallCudaFlag() {
|
|
|
118
124
|
}
|
|
119
125
|
switch (flag) {
|
|
120
126
|
case 'true':
|
|
127
|
+
case '1':
|
|
128
|
+
case 'ON':
|
|
121
129
|
return tryGetCudaVersion();
|
|
122
130
|
case 'v11':
|
|
123
131
|
return 11;
|