I get similar error message when loss of pytorch model gets very big ie infinity. For example if I decrease learning rate then I wont get this error.
Here is example of errors I am getting:

/opt/conda/conda-bld/pytorch_1579022034529/work/aten/src/ATen/native/cuda/MultinomialKernel.cu:243: void at::native::::sampleMultinomialOnce(long *, long, int, scalar_t *, scalar_t *, int, int) [with scalar_t = float, accscalar_t = float]: block: [0,0,0], thread: [2,0,0] Assertion val >= zero failed.