mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-06 02:49:56 +00:00
fix: clarify that ORT CUDA binaries are linux/x64 only
ORT 1.24.x downloads CUDA provider .so from NuGet at postinstall, but only for linux/x64. The process.arch guard correctly returns false on arm64 (safe CPU fallback), but the prior comment implied arm64 CUDA was supported. Clarify the actual state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
60265c1d0d
commit
56356b71db
1 changed files with 3 additions and 1 deletions
|
|
@ -38,7 +38,9 @@ function hasOrtCudaProvider(): boolean {
|
|||
const transformersDir = dirname(require.resolve('@huggingface/transformers/package.json'));
|
||||
const ortRequire = createRequire(join(transformersDir, 'package.json'));
|
||||
const ortPath = dirname(ortRequire.resolve('onnxruntime-node/package.json'));
|
||||
const arch = process.arch; // x64, arm64, etc.
|
||||
// ORT 1.24.x only ships CUDA binaries for linux/x64 (downloaded from NuGet
|
||||
// at postinstall). arm64 will correctly return false here until ORT adds support.
|
||||
const arch = process.arch;
|
||||
return existsSync(join(ortPath, 'bin', 'napi-v6', 'linux', arch, 'libonnxruntime_providers_cuda.so'));
|
||||
} catch {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue