'Device Side assert triggered at....' Error

Hi @ptrblck. I did that and got

os.environ[‘CUDA_LAUNCH_BLOCKING’]’ is not recognized as an internal or external command, operable program or batch file.

I don’t know, how to set this command on Windows, but did you run the code on the CPU and was it successful?
If so, could you check the shapes of all tensors in embeddings (assuming it’s a list)?

No. Still errors on the embedding layer. I guess I’ll have to read up. Not sure where it’s going wrong in that particular piece of code.

Sorry for missing it, but I thought you are working on another new bug.

The original error points to an out of bounds index:

 block: [0,0,0], thread: [0,0,0] Assertion `srcIndex < srcSelectDimSize` failed.

If this is raised by the embedding layer, then most likely your input tensor contains indices outside of [0, num_embeddings-1]. Could you check it, please?

I’m not sure I understand. I can pull the embedding sizes but I’m not sure what exactly I should check or how?

The nn.Embedding layer would get an input tensor, and you should check its min and max value, e.g. as:

print(x.min(), x.max())
out = self.embedding(x) # raises the index error

This might give you the indices, which are out of bounds. However, the error description is a bit confusing, as you mentioned a tensor creation is creating the issue in the first post:

and later point towards an embedding layer:

, so I’m unsure where the actual error is coming from.

Alright. I need to brush up to really understand what’s going on. Thank you so much for replying. I’m going to go read up on embedding layers.