Skip to content

question about test_global_memory_buffer #652

Description

@wangxicoding

why obtained_tensor equal with expected_tensor. If the value of memory is random, I don't think it will always be equal.

def test_global_memory_buffer():
global_memory_buffer = util.GlobalMemoryBuffer()
obtained_tensor = global_memory_buffer.get_tensor((3,2), torch.float32, "test_tensor")
expected_tensor = torch.empty((3,2), dtype=torch.float32, device=torch.cuda.current_device())
assert torch.equal(obtained_tensor, expected_tensor)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleNo activity in 60 days on issue or PR

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions