Remove "include THC.h" for PyTorch 1.10+. It is the same as this pull request.
Modify the code for computing relative_position_index. As described in this issue, the code
relative_position_index = (relative_position + 2 * self.window_size - 0.0001) // self.quant_size
can guarantee all the values of relative_position_index do not exceed the upper bound (63) but cannot ensure that any of them is less than the lower bound (0).
The test.py for evaluating the pre-trained model is successful.
relative_position_index = (relative_position + 2 * self.window_size - 0.0001) // self.quant_size
can guarantee all the values of relative_position_index do not exceed the upper bound (63) but cannot ensure that any of them is less than the lower bound (0).