Skip to content

Test MemmapTensor creation with shape, dtype and device #221

Closed
@vmoens

Description

@vmoens

MemmapTensors can be created via MemmapTensor(tensor), MemmapTensor(memmap_tensor), MemmapTensor(array) and MemmapTensor(*size, device=device, dtype=dtype).
We don't explicitely test those four methods of creating a memmap tensor.

The test should include:

  • tests regarding device: is the device the one expected (using get_available_devices() and pytest.mark.parameterize). Is the device accurate after calling to(device)?
  • similar tests for dtype
  • testing that inputting a zero-tensor / zero-array / zero-memmap to MemmapTensor results in the same tensor (ie has the same value) than creating a MemmapTensor via its shape

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