Pytorch-Correlation-extension icon indicating copy to clipboard operation
Pytorch-Correlation-extension copied to clipboard

ROCm support?

Open jin-eld opened this issue 2 years ago • 0 comments
trafficstars

Hi,

did anyone get this to work on AMD GPUs on Linux? I tried various things, including the hipconvonvert scripts, but there seems to be some mismatch between headers and the compilation runs into errors like (the actual output is a lot longer):

/mnt/ssd/Segment-and-Track-Anything/Pytorch-Correlation-extension/Correlation_Module/correlation_hip_kernel.hip:4:17: error: expected namespace name
using namespace torch;
                ^
/mnt/ssd/Segment-and-Track-Anything/Pytorch-Correlation-extension/Correlation_Module/correlation_hip_kernel.hip:25:11: error: use of undeclared identifier 'RestrictPtrTraits'
    const TensorAcc4R rInput1,
          ^
/mnt/ssd/Segment-and-Track-Anything/Pytorch-Correlation-extension/Correlation_Module/correlation_hip_kernel.hip:14:55: note: expanded from macro 'TensorAcc4R'
#define TensorAcc4R PackedTensorAccessor32<scalar_t,4,RestrictPtrTraits>
                                                      ^
/mnt/ssd/Segment-and-Track-Anything/Pytorch-Correlation-extension/Correlation_Module/correlation_hip_kernel.hip:26:11: error: use of undeclared identifier 'RestrictPtrTraits'
    const TensorAcc4R rInput2,
          ^
/mnt/ssd/Segment-and-Track-Anything/Pytorch-Correlation-extension/Correlation_Module/correlation_hip_kernel.hip:14:55: note: expanded from macro 'TensorAcc4R'
#define TensorAcc4R PackedTensorAccessor32<scalar_t,4,RestrictPtrTraits>
                                                      ^
/mnt/ssd/Segment-and-Track-Anything/Pytorch-Correlation-extension/Correlation_Module/correlation_hip_kernel.hip:27:5: error: use of undeclared identifier 'RestrictPtrTraits'
    TensorAcc5R output,
    ^

This is on torch 2.0.1+rocm5.4.2.

jin-eld avatar Oct 06 '23 20:10 jin-eld