Source/Systems

PartitionedRegression.Build.NativeHost

systems/partitioned-regression/src/PartitionedRegression/Build/NativeHost.alpha

409 lines17 declarations19.6 KiBSHA-256 9ed4dc3232a7

def · lines 203–406

partitionedDeviceArtifact

Full file
argv: [previous checkpoint or unused], candidate, committed generation, containing directory, exclusive device-readback file. Socket address and exact card binding are admitted deployment inputs to compilation. Prediction uses the identical numerical checkpoint contract in a fresh process.
203def partitionedDeviceArtifact =
204  (lambda unrestricted profile : (family RunPodSM86TargetProfile) .
205    (lambda unrestricted device : (family NvidiaDeviceBinding) .
206      (lambda unrestricted worker : Nat .
207        (lambda unrestricted address : (family IPv4Address) .
208          (lambda unrestricted port : Nat .
209            (lambda unrestricted resume : Nat .
210              (lambda unrestricted steps : Nat .
211                (eliminate
212                  NvidiaLinearStepPlan
213                  (lambda unrestricted p : (family NvidiaLinearStepPlan) . Bytes)
214                  (pgPlan profile)
215                  (branch
216                    NvidiaLinearStepPlanValue
217                    layout
218                    component
219                    recipes
220                    data
221                    inputOffset
222                    targetOffset
223                    outputOffset
224                    dataBytes
225                    admitted
226                    .
227                    (nat-eliminate
228                      (lambda unrestricted ok : Nat . Bytes)
229                      b""
230                      (lambda unrestricted previous : Nat .
231                        (lambda unrestricted ignored : Bytes .
232                          (peerLayoutsFor
233                            pgRun
234                            pgSchema
235                            phStateExtent
236                            (lambda unrestricted initial : (family RegionFrameLayout) .
237                              (lambda unrestricted contribution : (family RegionFrameLayout) .
238                                (lambda unrestricted updated : (family RegionFrameLayout) .
239                                  (lambda unrestricted acknowledged : (family RegionFrameLayout) .
240                                    (lambda unrestricted work : Nat .
241                                      (eliminate
242                                        StdResult
243                                        (lambda unrestricted r : (family StdResult (family NativeCheckpointFailure) (family NativeCheckpointLayout)) .
244                                        Bytes)
245                                        (planNativeCheckpoint
246                                        pgCheckpointContract
247                                        (frameAlign (peerEndpointEnd (peerWorkEnd work)))
248                                        peerWordBytes
249                                        (naturalMultiply 2 peerWordBytes)
250                                        1048576)
251                                        (branch StdFailure error . b"")
252                                        (branch
253                                        StdSuccess
254                                        checkpoint
255                                        .
256                                        (eliminate
257                                        StdResult
258                                        (lambda unrestricted r : (family StdResult (family SocketAddressFailure) Bytes) .
259                                        Bytes)
260                                        (linuxIPv4SocketAddress address port)
261                                        (branch StdFailure error . b"")
262                                        (branch
263                                        StdSuccess
264                                        socketAddress
265                                        .
266                                        (let unrestricted counter =
267                                        (frameAlign (nativeCheckpointEnd checkpoint))
268                                        in
269                                        (let unrestricted scratch =
270                                        (naturalAdd counter peerWordBytes)
271                                        in
272                                        (let unrestricted second =
273                                        (naturalAdd scratch peerWordBytes)
274                                        in
275                                        (let unrestricted extent =
276                                        (naturalAdd second peerWordBytes)
277                                        in
278                                        (let unrestricted destination =
279                                        (naturalSelect
280                                        worker
281                                        (framePayloadAt contribution)
282                                        (framePayloadAt updated))
283                                        in
284                                        (let unrestricted program =
285                                        (component
286                                        (constructor
287                                        NvidiaWholeProgramComponent
288                                        NvidiaWholeProgramProgramRecipe))
289                                        in
290                                        (let unrestricted qmd =
291                                        (component
292                                        (constructor
293                                        NvidiaWholeProgramComponent
294                                        NvidiaWholeProgramQMDRecipe))
295                                        in
296                                        (let unrestricted push =
297                                        (component
298                                        (constructor
299                                        NvidiaWholeProgramComponent
300                                        NvidiaWholeProgramPushbufferRecipe))
301                                        in
302                                        (let unrestricted ring =
303                                        (component
304                                        (constructor
305                                        NvidiaWholeProgramComponent
306                                        NvidiaWholeProgramGPFIFORecipe))
307                                        in
308                                        (let unrestricted entry =
309                                        (nvidiaPlanHostTableWord
310                                        (component
311                                        (constructor
312                                        NvidiaWholeProgramComponent
313                                        NvidiaWholeProgramGPFIFO))
314                                        0)
315                                        in
316                                        (nlsWithPrivateSlots
317                                        peerEndpointSlots
318                                        (pgPrelude device layout recipes program qmd push ring)
319                                        (lambda unrestricted prepare : (family NativePhysicalCommands) .
320                                        (nlsWithPrivateSlots
321                                        peerEndpointSlots
322                                        (pgContribution
323                                        layout
324                                        entry
325                                        data
326                                        inputOffset
327                                        targetOffset
328                                        outputOffset
329                                        counter
330                                        scratch
331                                        second
332                                        worker
333                                        (framePayloadAt initial)
334                                        destination)
335                                        (lambda unrestricted local : (family NativePhysicalCommands) .
336                                        (nlsWithPrivateSlots
337                                        peerEndpointSlots
338                                        (pgReadback
339                                        layout
340                                        data
341                                        outputOffset
342                                        counter
343                                        (phTelemetry
344                                        3
345                                        b"partitioned-peer:device-updates-retired"
346                                        (phRelease peerEnd)))
347                                        (lambda unrestricted finish : (family NativePhysicalCommands) .
348                                        (nlsEmbedHost
349                                        pgIdentities
350                                        (nativePhysicalGenerateNativeELFBytesDirect
351                                        (peerProgram
352                                        (naturalAdd peerEndpointSlots phSlots)
353                                        extent
354                                        (peerCheckpointStart
355                                        checkpoint
356                                        initial
357                                        resume
358                                        (peerStore
359                                        counter
360                                        (phImm 0)
361                                        (prSplice
362                                        prepare
363                                        (peerNativeSetup
364                                        worker
365                                        socketAddress
366                                        (peerWorkEnd work)
367                                        (peerImmediateTransmission
368                                        work
369                                        (peerUpdatesWith
370                                        (prSplice local)
371                                        (nativeLaunchRecipeSlotValue peerConnectionSlot)
372                                        worker
373                                        0
374                                        steps
375                                        (frameNativeLoad (peerCheckpointEpochAt checkpoint))
376                                        (frameNativeLoad (nativeCheckpointUpdatesAt checkpoint))
377                                        initial
378                                        contribution
379                                        updated
380                                        acknowledged
381                                        work
382                                        (prSplice
383                                        finish
384                                        (peerCheckpointFinish
385                                        checkpoint
386                                        initial
387                                        worker
388                                        steps
389                                        (nativeLaunchRecipeSlotValue peerConnectionSlot)))))))))))
390                                        program
391                                        qmd
392                                        push
393                                        ring)))))))))))))))))))))))))))))
394                      (naturalAnd
395                        admitted
396                        (naturalAnd
397                          (nvidiaDeviceBindingAdmitted device)
398                          (naturalAnd
399                            (naturalEqual (bytes-length (nvidiaDeviceBindingUUID device)) 16)
400                            (naturalAnd
401                              (naturalLessOrEqual worker 1)
402                              (naturalAnd
403                                (naturalLessOrEqual resume 1)
404                                (naturalAnd
405                                  (naturalNonzero steps)
406                                  (naturalLessOrEqual steps regionFrameWordLimit)))))))))))))))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.