Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to generate KeyedJaggedTensor on GPU #1715

Open
xiexbing opened this issue Feb 19, 2024 · 4 comments
Open

how to generate KeyedJaggedTensor on GPU #1715

xiexbing opened this issue Feb 19, 2024 · 4 comments

Comments

@xiexbing
Copy link

Hello,

I compressed the values, and lengths to reduce the PCIe cost. then I want to move the keys, compressed values and lengths to GPU, and then decompress and generate KJT on GPUs.

My question is: any examples on how to do this?

thanks.

@henrylhtsang
Copy link
Contributor

what do you mean by "compress"? They should be torch.tensors right?

@xiexbing
Copy link
Author

xiexbing commented Feb 20, 2024 via email

@xiexbing
Copy link
Author

sorry, I have keys as a string list, values as a list tensor, lengths as a list tensor.

@henrylhtsang
Copy link
Contributor

@xiexbing I think you can just first move the tensors to GPU, and then initialize a kjt that way? if I remember correctly, that should work just fine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants