Source/Systems

Bob.ArenaPlan

systems/bob/src/Bob/ArenaPlan.alpha

33 lines15 declarations2.1 KiBSHA-256 82796084aef5

Complete file · line 16

ArenaPlan.alpha

Definition view
1module Bob.ArenaPlan
2
3import Compiler.Planning.VA
4import Platform.Linux.Nvidia.PlanHost
5import Std.Natural
6
7-- Bob's buffers in the card's address space, each in its own slot after the
8-- previous from the device origin (Compiler.Planning.VA), and their mappings
9-- in the process, each after the previous from the plan host's mapping
10-- origin.  Every buffer is system memory but the GPFIFO; the arena (the
11-- parameters, moments, gradients, input record and results) is the last.
12-- The host side of the arena certificate decides that they are disjoint
13-- and clear of the host's own mappings.
14def bobDeviceSlotBytes : Nat = 0x0100_0000
15
16def bobGPFIFOBase : Nat = vaBaseNatural
17def bobPushbufferBase : Nat = (vaPlaceAfter bobGPFIFOBase bobDeviceSlotBytes bobDeviceSlotBytes)
18def bobSemaphoreBase : Nat = (vaPlaceAfter bobPushbufferBase bobDeviceSlotBytes bobDeviceSlotBytes)
19def bobProgramBase : Nat = (vaPlaceAfter bobSemaphoreBase bobDeviceSlotBytes bobDeviceSlotBytes)
20def bobQMDBase : Nat = (vaPlaceAfter bobProgramBase bobDeviceSlotBytes bobDeviceSlotBytes)
21def bobArenaBase : Nat = (vaPlaceAfter bobQMDBase bobDeviceSlotBytes bobDeviceSlotBytes)
22-- the end of the address range the card maps for Bob
23def bobMappedEnd : Nat = (vaPlaceAfter bobArenaBase bobDeviceSlotBytes bobDeviceSlotBytes)
24-- the video memory Bob asks the card for: one slot (the GPFIFO and its USERD
25-- page are all it places there)
26def bobMinimumVideoBytes : Nat = bobDeviceSlotBytes
27
28def bobHostGPFIFO : Nat = nvidiaPlanHostMappingOrigin
29def bobHostPushbuffer : Nat = (vaPlaceAfter bobHostGPFIFO nvidiaPlanHostMappingAlignment nvidiaPlanHostMappingAlignment)
30def bobHostSemaphores : Nat = (vaPlaceAfter bobHostPushbuffer nvidiaPlanHostMappingAlignment nvidiaPlanHostMappingAlignment)
31def bobHostProgram : Nat = (vaPlaceAfter bobHostSemaphores nvidiaPlanHostMappingAlignment nvidiaPlanHostMappingAlignment)
32def bobHostQMD : Nat = (vaPlaceAfter bobHostProgram nvidiaPlanHostMappingAlignment nvidiaPlanHostMappingAlignment)
33def bobHostStaging : Nat = (vaPlaceAfter bobHostQMD nvidiaPlanHostMappingAlignment nvidiaPlanHostMappingAlignment)

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.