You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the below issues, we only check equality of the output tensor and not the index tensor.
1. We can't verify index tensors since VK-float16 vs CPU-float32 deltas can change which index in a pool is the maximum. That can yield completely different integers in the index tensor. Hence, we only verify the output tensor not the index tensor.
2. To actually visualize the index tensor, we need to re-construct the int32 values from the int64 values. Since the `torch.int64` index tensor is serialized as `int32` in Vulkan, Python expects int64 but C++ writes to the buffer as though it is for int32. Hence, we must apply some computation to re-construct the tensor. See below for details. A helper function was included in an earlier version of this change, but was removed for conciseness since we aren't checking that index tensor anyway.
For example, if the first and second elements return 16 and 17, we get this value as the first element:
```
73014444048 = 1000100000000000000000000000000010000
```
We must split this int64 into two int32 values, and construct a new tensor accordingly.
```
10001 | 00000000000000000000000000010000
10001 | 10000
17 | 16
```
Differential Revision: [D54962492](https://our.internmc.facebook.com/intern/diff/D54962492/)
ghstack-source-id: 219490380
Pull Request resolved: #2548
0 commit comments