Is there a bug with is_pinned. It throws an exception in debug mode

Im programming with torchlib and I create a small tensor on cpu, not pinned. When I call is_pinned I get an exception if Im in Debug mode, but not in Release. I use torchlib (windows) version 1.6.

Has anyone else seen this problem?

// The code:
auto v = torch::zeros({2, 2})
v.is_pinned();

@Anders_G
I think this is something with the Debug mode build flags.
Please create an issue at ‘https://github.com/pytorch/pytorch/issues
We will have windows people looking into this, thanks.

1 Like