chore: bump cortex to the latest version 1.0.10-rc1 to address hardware UI issues (#4622)
* chore: bump cortex to the latest version 1.0.10-rc1 to address hardware API issues * fix: app crashes while reading properties from undefined value * fix: cuda engine variant selection logic
This commit is contained in:
parent
386d41028a
commit
ceb93cafef
@ -13,7 +13,7 @@ export type GpuAdditionalInformation = {
|
|||||||
|
|
||||||
export type Gpu = {
|
export type Gpu = {
|
||||||
activated: boolean
|
activated: boolean
|
||||||
additional_information: GpuAdditionalInformation
|
additional_information?: GpuAdditionalInformation
|
||||||
free_vram: number
|
free_vram: number
|
||||||
id: string
|
id: string
|
||||||
name: string
|
name: string
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
|
import { GpuAdditionalInformation } from '../hardware'
|
||||||
|
|
||||||
export type SystemResourceInfo = {
|
export type SystemResourceInfo = {
|
||||||
memAvailable: number
|
memAvailable: number
|
||||||
@ -12,13 +12,14 @@ export type GpuSetting = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type GpuSettingInfo = {
|
export type GpuSettingInfo = {
|
||||||
activated: boolean;
|
activated: boolean
|
||||||
free_vram: number;
|
free_vram: number
|
||||||
id: string;
|
id: string
|
||||||
name: string;
|
name: string
|
||||||
total_vram: number;
|
total_vram: number
|
||||||
uuid: string;
|
uuid: string
|
||||||
version: string;
|
version: string
|
||||||
|
additional_information?: GpuAdditionalInformation
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SystemInformation = {
|
export type SystemInformation = {
|
||||||
|
|||||||
@ -1,8 +1,4 @@
|
|||||||
|
import { GpuSetting, log } from '@janhq/core'
|
||||||
import {
|
|
||||||
GpuSetting,
|
|
||||||
log,
|
|
||||||
} from '@janhq/core'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The GPU runMode that will be set - either 'vulkan', 'cuda', or empty for cpu.
|
* The GPU runMode that will be set - either 'vulkan', 'cuda', or empty for cpu.
|
||||||
@ -10,14 +6,15 @@ import {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const gpuRunMode = (settings?: GpuSetting): string => {
|
const gpuRunMode = (settings?: GpuSetting): string => {
|
||||||
|
return settings.gpus?.some(
|
||||||
if (!settings) return ''
|
(gpu) =>
|
||||||
|
gpu.activated === true &&
|
||||||
return settings.vulkan === true ||
|
gpu.additional_information &&
|
||||||
settings.gpus?.some((gpu) => gpu.activated !== true)
|
gpu.additional_information.driver_version
|
||||||
? ''
|
)
|
||||||
: 'cuda'
|
? 'cuda'
|
||||||
|
: ''
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -60,7 +57,9 @@ const cudaVersion = (settings?: GpuSetting): '12-0' | '11-7' | undefined => {
|
|||||||
/**
|
/**
|
||||||
* Find which variant to run based on the current platform.
|
* Find which variant to run based on the current platform.
|
||||||
*/
|
*/
|
||||||
export const engineVariant = async (gpuSetting?: GpuSetting): Promise<string> => {
|
export const engineVariant = async (
|
||||||
|
gpuSetting?: GpuSetting
|
||||||
|
): Promise<string> => {
|
||||||
let engineVariant = [
|
let engineVariant = [
|
||||||
os(gpuSetting),
|
os(gpuSetting),
|
||||||
gpuSetting?.vulkan
|
gpuSetting?.vulkan
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
1.0.9-rc8
|
1.0.10-rc1
|
||||||
|
|||||||
@ -317,7 +317,7 @@ const Hardware = () => {
|
|||||||
Compute Capability
|
Compute Capability
|
||||||
</div>
|
</div>
|
||||||
<span>
|
<span>
|
||||||
{item.additional_information.compute_cap}
|
{item.additional_information?.compute_cap}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user