Most likely, the device assert is triggered before this (maybe invalid indices fed into embedding or so). You could run with blocking kernel launches 3 to find the instruction that actually goes wrong.
Best regards
Thomas