Skip to content

[FEA][C++ API] Fix update_dataset at C++ API layer #2404

Description

@HowardHuang1
  • At C API layer we already centralized an update to a single UpdateDataset function that internally dispatches to AttachDataset or UpdateDeviceDatasetSameLayout based on whether index is standard vs padded
  • However, at C++ API layer this can’t be easily done because attach_dataset doesn’t mutate the input index and instead returns a new index whereas update_device_dataset_same_layout mutates the original padded input dataset. C++ has guarantees about immutability for thread safety so we need to revisit how the update_dataset() function can be unified at the C++ API layer.
  • Ensure graph is not copied during update_dataset() call. Use move() instead to avoid copying graph when converting between index types for attach_dataset().

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions