Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 2562ac8

Browse files
authored
chore: fallback noavx binary (#1013)
1 parent 84e1e19 commit 2562ac8

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

cortex-js/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
"class-validator": "^0.14.1",
6060
"cli-progress": "^3.12.0",
6161
"cortex-cpp": "0.5.0-40",
62-
"cpu-instructions": "^0.0.11",
6362
"decompress": "^4.2.1",
6463
"hyllama": "^0.2.2",
6564
"js-yaml": "^4.1.0",

cortex-js/src/usecases/engines/engines.usecase.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ export class EnginesUsecases {
101101
? '-mac'
102102
: '-linux',
103103
// CPU Instructions - CPU | GPU Non-Vulkan
104-
options?.instructions && !isVulkan
105-
? `-${options?.instructions?.toLowerCase()}`
104+
!isVulkan
105+
? `-noavx`
106106
: '',
107107
// Cuda
108108
options?.runMode === 'GPU' &&

cortex-js/src/utils/init.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { InitOptions } from '@/infrastructure/commanders/types/init-options.interface';
2-
import { cpuInfo } from 'cpu-instructions';
32
import { checkNvidiaGPUExist } from './cuda';
43

54
/**
@@ -16,15 +15,5 @@ export const defaultInstallationOptions = async (): Promise<InitOptions> => {
1615
// If Nvidia Driver is installed -> GPU
1716
options.runMode = (await checkNvidiaGPUExist()) ? 'GPU' : 'CPU';
1817
options.gpuType = 'Nvidia';
19-
//CPU Instructions detection
20-
options.instructions = await detectInstructions();
2118
return options;
22-
};
23-
24-
const detectInstructions = (): Promise<
25-
'AVX' | 'AVX2' | 'AVX512' | undefined
26-
> => {
27-
const cpuInstruction = cpuInfo.cpuInfo()[0] ?? 'AVX';
28-
console.log(cpuInstruction, 'CPU instructions detected');
29-
return Promise.resolve(cpuInstruction);
30-
};
19+
};

0 commit comments

Comments
 (0)