SDK Configuration
The SDK is configured using the UPMEM_PROFILE environment variable.
In normal operation, setting this variable is not necessary,
as the SDK will automatically detect the hardware and use the appropriate backend.
However, in some advanced use cases, it may be necessary to set this variable.
It is a comma separated list of key=value pairs. Example usage:
$ export UPMEM_PROFILE="sgXferEnable=true,nrThreadPerPool=8"
$ ./my_program
runs an application that uses Scatter/Gather transfers and 8 threads per rank
or
$ UPMEM_PROFILE="backend=simulator,chipId=0x42" ./my_program
runs an application on the v1B simulator backend
The following keys are supported:
backendthe backend to use. Possible values are:
simulatoruse the simulator
hwuse the hardware
By default, the hardware is used if available, otherwise the simulator is used.
chipIdthe chip ID to use. This is only useful for setting the simulator backend. Possible values are:
0x2(default)the v1A simulator backend
0x42the v1B simulator backend
nrThreadPerPool(default:4)the number of host threads performing memory transfer operations on each PIMM rank. This is only relevant for the hardware backend.
In some cases, it may be beneficial to increase this value to
8to improve performance. On the other hand, if you are oversubscribing the host with other running applications, you may want to decrease this value to2.rankPathforces the SDK to use a specific rank. This is mostly useful for debugging purposes. Valid values are of the form
/dev/dpu_rankXwhereXis the rank number.regionModethe way the driver handles memory regions. There are three modes:
perf(default)the DPU memory and control interface are mapped to user space.
safethe DPU memory and control interface are accessed through the driver.
hybrid(experimental)the DPU memory is mapped to user space, and the control interface is accessed through the driver.
See Kernel Driver for more details.
sgXferEnable(default:false)enable or disable the use of scatter-gather transfers (see Scatter Gather Memory Transfer). Possible values are
trueandfalse.sgXferMaxBlocksPerDputhe maximum number of blocks that can be transferred in a single scatter-gather transfer. More details in Enabling scatter gather transfers.