pytorch / torchrec

Pytorch domain library for recommendation systems
BSD 3-Clause "New" or "Revised" License
1.86k stars 400 forks source link

gpu version `int_nbit_split_embedding_codegen_lookup_function` not support `indices` and `offsets` with uint64 dtype #1830

Open tiankongdeguiji opened 5 months ago

tiankongdeguiji commented 5 months ago

This PR removes uint32 indices protection in quant/embedding_modules.py. Nevertheless, when indices and offsets inputs of uint64 dtype are provided, int_nbit_split_embedding_codegen_lookup_function triggers a RuntimeError: expected scalar type Int but found Long on the GPU. Would it be possible to add support for the uint64 dtype on GPU devices?

PaulZhang12 commented 4 months ago

It what cases would it be necessary to use uint64?

tiankongdeguiji commented 4 months ago

It what cases would it be necessary to use uint64?

In certain scenarios, the uint32 data type is insufficient to contain the indices for user_id and several combo feature.

spcyppt commented 3 months ago

@tiankongdeguiji Hi, let me bring this to the FBGEMM team's attention and get back to you.