fix: instance types switch between gpu and cpu

This commit is contained in:
jialin
2026-06-12 12:10:14 +08:00
committed by jialin
parent 7b18a92388
commit ddf723525a
10 changed files with 270 additions and 60 deletions
@@ -149,6 +149,27 @@ export interface InstanceTypeOnceMaxRequestResource {
localStorage: QuanityLocalStorage;
}
export interface CPUCache {
l1i: string;
l1d: string;
l2: string;
l3: string;
}
export interface CPUInfo {
physicalCores: string;
threadsPerPhysicalCore: string;
logicalCores: string;
stepping: string | null;
clockSpeed: string | null;
maxClockSpeed: string | null;
cacheLine: string;
cache: CPUCache;
manufacturer: string;
product: string;
family: string;
}
export interface InstanceTypeSpec {
group: string;
acceleratable: boolean;
@@ -163,6 +184,10 @@ export interface InstanceTypeSpec {
cpu: QuanityCPU;
ram: QuanityMemory;
};
os?: string;
arch?: string;
cpu?: CPUInfo;
cache?: Record<string, string>;
unitResourcesParsed?: {
cpu: {
cores?: number;