Skip to content

Consider removing MLBufferView in its current form #560

@a-sully

Description

@a-sully

Building on #546 and #553

In the Chromium implementation, the Model Loader API spec, and - soon, once #553 merges - the WebNN spec, MLBufferView is specified as:

typedef ArrayBufferView MLBufferView;

This was intended to be forward-looking (let's be prepared for when we start using hardware accelerators?!) to provide a "view over some device-agnostic buffer", but at this point:

  1. We're ready to use hardware accelerators; MLBuffer is our proposed solution for a device-agnostic buffer (see Support for device-based tensor storage objects #482)
  2. It's unclear whether a typedef is sufficient to provide the "view over an MLBuffer" that MLBufferView was initially intending to provide, and
  3. This typedef is not adding any value otherwise

As @bbernhar pointed out in #553 (comment), we'll still likely want the ability to take a view over an MLBuffer. However, I (personally) think it's more likely this ends up looking more like a GpuBufferBinding than a typedef

Given all this, I propose we remove MLBufferView in its current form for now, and then we can discuss the specifics of how to take a view over an MLBuffer at a later time

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