File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ export class Llama {
4242 /** @internal */ public readonly _debug : boolean ;
4343 /** @internal */ public readonly _threadsSplitter : ThreadsSplitter ;
4444 /** @internal */ private readonly _gpu : LlamaGpuType ;
45+ /** @internal */ private readonly _numa : LlamaNuma ;
4546 /** @internal */ private readonly _buildType : "localBuild" | "prebuilt" ;
4647 /** @internal */ private readonly _cmakeOptions : Readonly < Record < string , string > > ;
4748 /** @internal */ private readonly _supportsGpuOffloading : boolean ;
@@ -95,6 +96,7 @@ export class Llama {
9596
9697 this . _bindings = bindings ;
9798 this . _debug = debug ;
99+ this . _numa = numa ?? false ;
98100 this . _logLevel = this . _debug
99101 ? LlamaLogLevel . debug
100102 : ( logLevel ?? LlamaLogLevel . debug ) ;
@@ -111,7 +113,7 @@ export class Llama {
111113
112114 bindings . ensureGpuDeviceIsSupported ( ) ;
113115
114- if ( numa != null && numa !== false )
116+ if ( this . _numa !== false )
115117 bindings . setNuma ( numa ) ;
116118
117119 this . _gpu = bindings . getGpuType ( ) ?? false ;
@@ -211,6 +213,13 @@ export class Llama {
211213 this . _threadsSplitter . maxThreads = Math . floor ( Math . max ( 0 , value ) ) ;
212214 }
213215
216+ /**
217+ * See the `numa` option of `getLlama` for more information
218+ */
219+ public get numa ( ) {
220+ return this . _numa ;
221+ }
222+
214223 public get logLevel ( ) {
215224 return this . _logLevel ;
216225 }
You can’t perform that action at this time.
0 commit comments