Ah, so you put context in cbos_embedder onto the GPU?
Then it shouldn’t be the error. No, I think your method is fine to just push the sample onto the GPU instead of the whole dataset.
Do you get a full error message or just a SEGFAULT?