Skip to content

Use ArcArray in ndarray backend #179

@statusfailed

Description

@statusfailed

Problem

catgrad's interpreter::backend::Backend generally assumes that ops take ownership of tensors.
This means they can deallocate them, or even re-use input tensors to write outputs, avoiding allocating additional memory.

However, parameters cannot have ownership transferred without (inefficiently) cloning the whole tensor.

Task

Change Backend::NdArray type for ndarray backend to use ArcArrayD instead (so we can cheaply clone parameter tensors).

Outcome

  • Patched ndarray backend using ArcArrayD for its NdArray type
  • Criterion Benchmark showing improvement over baseline (current) implementation

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions