RUCAIBox / RecBole

A unified, comprehensive and efficient recommendation library
https://recbole.io/
MIT License
3.39k stars 610 forks source link

[💡SUG] Replace Numpy operations in the `forward` function of SR-GNN and GC-SAN with PyTorch code #1895

Open bkersbergen opened 11 months ago

bkersbergen commented 11 months ago

Is your feature request related to a problem? Please describe. The models SR-GNN, GC-SAN contain NumPy operations in their forward function which requires repeated data transfers between CPU and GPU during training and inference. This is very inefficient.

Describe the solution you'd like Replace the Numpy operations with PyTorch code.

Describe alternatives you've considered

Additional context

Fotiligner commented 11 months ago

@bkersbergen Thank you for your suggestions! The numpy operations in forward are mainly from function "_get_slice". We will rewrite the function and update the model.