Skip to content

Memory Mapped Buffers #197

@tjablin

Description

@tjablin

Consider a batch one inference system where input activations are mapped in host DRAM are mapped into the device's address space on demand using an ioctl. The device driver is optimized for the case where a single buffer is reused for many inferences. In order to avoid unnecessary ioctl's, the device driver checks if the buffer is already mapped, skipping the ioctl for the common case of buffer reuse. Is 'caching' pointers for the purpose of avoiding ioctls allowed in MLPerf?

I think the answer is 'Yes.' My reasoning is as follows:

  1. In a real application, most users would copy activations into a re-usable buffer and avoid the ioctl.
  2. The data still starts in host DRAM.
  3. If the shared memory were managed by the user instead, the user could achieve the same affect by loading the dataset into a manually allocated a shared buffer. The driver's 'caching' just accomplishes automatically, what the user could have done manually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions