File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ export class PodmanConnection extends Publisher<ContainerProviderConnectionInfo[
156
156
157
157
protected parseVMType ( vmtype : string | undefined ) : VMType {
158
158
if ( ! vmtype ) return VMType . UNKNOWN ;
159
- const type = VMType [ vmtype . toUpperCase ( ) as keyof typeof VMType ] ;
159
+ const type = Object . values ( VMType ) . find ( s => s === vmtype ) ;
160
160
if ( type === undefined ) {
161
161
return VMType . UNKNOWN ;
162
162
}
Original file line number Diff line number Diff line change @@ -250,12 +250,10 @@ export class LlamaCppPython extends InferenceProvider {
250
250
case VMType . WSL :
251
251
return gpu ?. vendor === GPUVendor . NVIDIA ? llamacpp . cuda : llamacpp . default ;
252
252
case VMType . LIBKRUN :
253
+ case VMType . LIBKRUN_LABEL :
253
254
return gpu ? llamacpp . vulkan : llamacpp . default ;
254
255
// no GPU support
255
- case VMType . QEMU :
256
- case VMType . APPLEHV :
257
- case VMType . HYPERV :
258
- case VMType . UNKNOWN :
256
+ default :
259
257
return llamacpp . default ;
260
258
}
261
259
}
Original file line number Diff line number Diff line change 19
19
export enum VMType {
20
20
WSL = 'wsl' ,
21
21
LIBKRUN = 'libkrun' ,
22
+ LIBKRUN_LABEL = 'GPU enabled (LibKrun)' ,
22
23
QEMU = 'qemu' ,
23
24
APPLEHV = 'applehv' ,
25
+ APPLEHV_LABEL = 'default (Apple HyperVisor)' ,
24
26
HYPERV = 'hyperv' ,
25
27
UNKNOWN = 'unknown' ,
26
28
}
You can’t perform that action at this time.
0 commit comments