Source/Systems

PartitionedRegression.Build.CoordinateDevice

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

572 lines19 declarations27.0 KiBSHA-256 19b30f5eebcb

def · lines 276–426

coordinateDeviceArtifact

Full file
argv is the derived manifest/shard layout followed by an exclusive device readback path. The session uploads state once, then the three submissions share video memory. Final device capture/readback and release precede the global checkpoint publication protocol; no success bypasses either lifecycle.
276def coordinateDeviceArtifact =
277  (lambda unrestricted resources : (family NvidiaResourceContext) .
278    (lambda unrestricted profile : (family RunPodSM86TargetProfile) .
279      (lambda unrestricted device : (family NvidiaDeviceBinding) .
280        (lambda unrestricted worker : Nat .
281          (lambda unrestricted address : (family IPv4Address) .
282            (lambda unrestricted port : Nat .
283              (lambda unrestricted resume : Nat .
284                (lambda unrestricted epoch : Nat .
285                  (lambda unrestricted steps : Nat .
286                    (eliminate
287                      NvidiaProgramPlan
288                      (lambda unrestricted plan : (family NvidiaProgramPlan) . Bytes)
289                      (cdmPlan profile)
290                      (branch
291                        NvidiaProgramPlanValue
292                        gpu
293                        component
294                        recipes
295                        data
296                        dataGPU
297                        dataBytes
298                        admitted
299                        .
300                        (nat-eliminate
301                          (lambda unrestricted valid : Nat . Bytes)
302                          b""
303                          (lambda unrestricted previous : Nat .
304                            (lambda unrestricted ignored : Bytes .
305                              (chWithLayout
306                                cdNumerics
307                                epoch
308                                phStateExtent
309                                (lambda unrestricted layout : (family CoordinateHostLayout) .
310                                  (eliminate
311                                    StdResult
312                                    (lambda unrestricted result : (family StdResult (family SocketAddressFailure) Bytes) .
313                                      Bytes)
314                                    (linuxIPv4SocketAddress address port)
315                                    (branch StdFailure error . b"")
316                                    (branch
317                                      StdSuccess
318                                      socketAddress
319                                      .
320                                      (nat-eliminate
321                                        (lambda unrestricted valid : Nat . Bytes)
322                                        b""
323                                        (lambda unrestricted previous : Nat .
324                                        (lambda unrestricted ignored : Bytes .
325                                        (nlsWithProgramRecipes
326                                        component
327                                        (lambda unrestricted program : Bytes .
328                                        (lambda unrestricted qmd : Bytes .
329                                        (lambda unrestricted push : Bytes .
330                                        (lambda unrestricted ring : Bytes .
331                                        (nlsWithPrivateSlots
332                                        nativePeerEndpointSlots
333                                        (nlsSessionPrelude
334                                        cdIdentity
335                                        b"coordinate-peer"
336                                        device
337                                        gpu
338                                        recipes
339                                        program
340                                        qmd
341                                        push
342                                        ring
343                                        (cdSeedMemory layout data chEnd))
344                                        (lambda unrestricted prepare : (family NativePhysicalCommands) .
345                                        (nlsWithPrivateSlots
346                                        nativePeerEndpointSlots
347                                        (cdMemoryPhase
348                                        layout
349                                        gpu
350                                        component
351                                        data
352                                        (constructor CoordinateDevicePhase CoordinateDeviceForward)
353                                        chEnd)
354                                        (lambda unrestricted forward : (family NativePhysicalCommands) .
355                                        (nlsWithPrivateSlots
356                                        nativePeerEndpointSlots
357                                        (cdMemoryPhase
358                                        layout
359                                        gpu
360                                        component
361                                        data
362                                        (constructor CoordinateDevicePhase CoordinateDeviceBackward)
363                                        chEnd)
364                                        (lambda unrestricted backward : (family NativePhysicalCommands) .
365                                        (nlsWithPrivateSlots
366                                        nativePeerEndpointSlots
367                                        (cdMemoryPhase
368                                        layout
369                                        gpu
370                                        component
371                                        data
372                                        (constructor CoordinateDevicePhase CoordinateDeviceUpdate)
373                                        chEnd)
374                                        (lambda unrestricted update : (family NativePhysicalCommands) .
375                                        (nlsWithPrivateSlots
376                                        nativePeerEndpointSlots
377                                        (cdCaptureMemory
378                                        layout
379                                        data
380                                        (nvidiaProgramReadback
381                                        (chArgument (succ chDirectoryIndex))
382                                        (prSemaphoreHost gpu)
383                                        data
384                                        dataBytes
385                                        cdmIssueCount
386                                        (cdCounter (chExtent layout))
387                                        (phTelemetry
388                                        3
389                                        b"coordinate-peer:device-updates-retired"
390                                        (phRelease chEnd))))
391                                        (lambda unrestricted finish : (family NativePhysicalCommands) .
392                                        (nlsEmbedHost
393                                        cdIdentity
394                                        (nlsGenerateResourceELF
395                                        resources
396                                        gpu
397                                        (chProgramFor
398                                        (naturalAdd nativePeerEndpointSlots phSlots)
399                                        (cdTrainingExtent (chExtent layout))
400                                        (chCommandsWithSession
401                                        layout
402                                        worker
403                                        socketAddress
404                                        resume
405                                        steps
406                                        (prSplice forward)
407                                        (prSplice backward)
408                                        (prSplice update)
409                                        (lambda unrestricted tail : (family NativePhysicalCommands) .
410                                        (chStore
411                                        (cdCounter (chExtent layout))
412                                        (phImm 0)
413                                        (prSplice prepare tail)))
414                                        (prSplice finish))))
415                                        program
416                                        qmd
417                                        push
418                                        ring))))))))))))))))))
419                                        (arenaCertificate
420                                        (cdTrainingExtent (chExtent layout))
421                                        (cdTrainingResidents (chExtent layout) (chResidents layout))))))))))
422                          (naturalAnd
423                            admitted
424                            (naturalAnd
425                              (cdBindingAdmitted device)
426                              (cdTrainingAdmitted worker resume epoch steps)))))))))))))))

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.