-
Notifications
You must be signed in to change notification settings - Fork 32
PIM API
Farzana Ahmed Siddique edited this page Sep 16, 2024
·
3 revisions
PIMeval provides a single public header for PIM benchmark application development, locating at libpimeval/src/libpimeval.h. Details of data types and APIs of this header are described in this wiki page.
(more details to be added)
-
PimObjId- An integer value represents an allocated PIM object.
-
PimDeviceEnum- PIM architecture.
-
PimAllocEnum- PIM allocation strategy.
-
PIM_ALLOC_AUTO: Recommended way which can automatically determine V or H data layouts based on functional simulation target.
-
PimDataType- PIM object element data type required for allocating a PIM object.
-
PimCopyEnum- Data copy strategy.
-
PimDeviceProperties- PIM device properties.
-
pimCreateDevice- Create a PIM device of a specific PIM device type to start simulation.
- Use
PIM_FUNCTIONALfor functional simulation, so that a PIM benchmark can work for multiple PIM simulation targets. - Use specific PIM device type for micro-ops level simulation.
-
pimCreateDeviceFromConfig- Read PIMeval and device parameters from a config file.
- Alternatively, config file can be specified through environment variables.
PIMEVAL_TARGETPIMEVAL_CONFIG_PATHPIMEVAL_CONFIG_SIM
-
pimGetDeviceProperties- Get PIM device properties.
-
pimDeleteDevice- Delete PIM device and end simulation.
-
pimAlloc- Allocate a new PIM data object.
-
pimAllocAssociated- Allocate a new PIM data object associated with an existing PIM object.
- Associated PIM objects have same number of elements, and element indices are aligned during allocation.
-
pimFree- Delete a PIM object and free the memory space.
-
pimCopyHostToDevice- Copy data from CPU memory space to PIM memory space.
-
pimCopyDeviceToHost- Copy data from PIM memory space to CPU memory space.
-
pimCopyDeviceToDevice- COpy data between two associated PIM objects.
Arithmetic
pimAddpimSubpimMulpimDivpimAbspimMinpimMaxpimAddScalarpimSubScalarpimMulScalarpimDivScalarpimAbsScalarpimMinScalarpimMaxScalar
Bitwise
pimAndpimOrpimXorpimXnorpimAndScalarpimOrScalarpimXorScalarpimXnorScalarpimShiftBitsRightpimShiftBitsLeftpimPopCount
Relational
pimGTpimLTpimEQpimGTScalarpimLTScalarpimEQScalar
Reduction sum
pimRedSumIntpimRedSumUIntpimRedSumRangedIntpimRedSumRangedUInt
Broadcast
pimBroadcastIntpimBroadcastUInt
Element-wise shift/rotate
pimRotateElementsRightpimRotateElementsLeftpimShiftElementsRightpimShiftElementsLeft
To be added.