Repository: pytorch
Issue: [JIT] NVRTC unknown error 
Labels: oncall: jit,NNC

## 🐛 Bug
This is a demo of my model.
I found that when reasoning the model established by the above code, an error will be reported if it is cycled three times. What is the reason?

**code:** 
```
import torch
import torch.nn as nn

def torch_distributions_Categorical_probs_p__entropy__(p):
    return torch.distributions.Categorical(probs=p).entropy()
trace_torch_distributions_Categorical_probs_p__entropy__ = torch.jit.trace(torch_distributions_Categorical_probs_p__entropy__, torch.tensor([0.25, 0.25, 0.25, 0.25]))

def normal_shannon_entropy(p, labels_num):
    # type: (torch.Tensor, int) -> torch.Tensor
    """normal_shannon_entropy"""
    entropy = trace_torch_distributions_Categorical_probs_p__entropy__(p)
    normal = -torch.log(torch.tensor(1.0) / torch.tensor(labels_num))
    return entropy / normal

class test(nn.Module):
    def __init__(self):
        super(test, self).__init__()
        self.layer_num = 2
        self.output_layer = torch.nn.Linear(64, 2)

    def forward(self, input):
        # type: (torch.Tensor)
        idxs: List[int] = [i for i in range(5)]
        output_1 = torch.rand(1, 128).to("cuda:0")
        logits_this_layer = self.output_layer(output_1)
        probs = nn.functional.softmax(logits_this_layer, dim=1)
        entropys = normal_shannon_entropy(probs, self.layer_num)
        print(entropys)

m = test().to("cuda:0")
m = torch.jit.script(m)
for i in range(3):
    m(torch.randn(16, 1, 20, 20).to("cuda:0"))
```

**error:**
```
 0.9470
[ CUDAFloatType{1} ]
 0.9308
[ CUDAFloatType{1} ]
Traceback (most recent call last):
  File "tesr.py", line 33, in <module>
    m(torch.randn(16, 1, 20, 20).to("cuda:0"))
  File "/home/users/wangrui39/Python-3.6.5/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
    return forward_call(*input, **kwargs)
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
RuntimeError: default_program(26): error: extra text after expected end of number

default_program(26): error: extra text after expected end of number

default_program(27): error: extra text after expected end of number

default_program(27): error: extra text after expected end of number

4 errors detected in the compilation of "default_program".

nvrtc compilation failed:

#define NAN __int_as_float(0x7fffffff)
#define POS_INFINITY __int_as_float(0x7f800000)
#define NEG_INFINITY __int_as_float(0xff800000)


template<typename T>
__device__ T maximum(T a, T b) {
  return isnan(a) ? a : (a > b ? a : b);
}

template<typename T>
__device__ T minimum(T a, T b) {
  return isnan(a) ? a : (a < b ? a : b);
}

extern "C" __global__
void fused_div_clamp_log_clamp_mul(float* t_, float* t__, float* aten_mul, float* aten_clamp, float* aten_log, float* aten_clamp_1, float* aten_div) {
{
  if (512 * blockIdx.x + threadIdx.x<2 ? 1 : 0) {
    float t__1 = __ldg(t_ + (512 * blockIdx.x + threadIdx.x) % 2);
    float t___1 = __ldg(t__ + 0);
    aten_div[512 * blockIdx.x + threadIdx.x] = t__1 / t___1;
    aten_clamp_1[512 * blockIdx.x + threadIdx.x] = (t__1 / t___1<1.192092895507812e-07f ? 1.192092895507812e-07f : t__1 / t___1)>0.9999998807907104f ? 0.9999998807907104f : (t__1 / t___1<1.192092895507812e-07f ? 1.192092895507812e-07f : t__1 / t___1);
    aten_log[512 * blockIdx.x + threadIdx.x] = logf((t__1 / t___1<1.192092895507812e-07f ? 1.192092895507812e-07f : t__1 / t___1)>0.9999998807907104f ? 0.9999998807907104f : (t__1 / t___1<1.192092895507812e-07f ? 1.192092895507812e-07f : t__1 / t___1));
    aten_clamp[512 * blockIdx.x + threadIdx.x] = (logf((t__1 / t___1<1.192092895507812e-07f ? 1.192092895507812e-07f : t__1 / t___1)>0.9999998807907104f ? 0.9999998807907104f : (t__1 / t___1<1.192092895507812e-07f ? 1.192092895507812e-07f : t__1 / t___1)))<-3.402823466385289e+38.f ? -3.402823466385289e+38.f : (logf((t__1 / t___1<1.192092895507812e-07f ? 1.192092895507812e-07f : t__1 / t___1)>0.9999998807907104f ? 0.9999998807907104f : (t__1 / t___1<1.192092895507812e-07f ? 1.192092895507812e-07f : t__1 / t___1)));
    aten_mul[512 * blockIdx.x + threadIdx.x] = ((logf((t__1 / t___1<1.192092895507812e-07f ? 1.192092895507812e-07f : t__1 / t___1)>0.9999998807907104f ? 0.9999998807907104f : (t__1 / t___1<1.192092895507812e-07f ? 1.192092895507812e-07f : t__1 / t___1)))<-3.402823466385289e+38.f ? -3.402823466385289e+38.f : (logf((t__1 / t___1<1.192092895507812e-07f ? 1.192092895507812e-07f : t__1 / t___1)>0.9999998807907104f ? 0.9999998807907104f : (t__1 / t___1<1.192092895507812e-07f ? 1.192092895507812e-07f : t__1 / t___1)))) * (t__1 / t___1);
  }
}
}
```

 - PyTorch Version (e.g., 1.0):
 - OS : linux
 - Python version: 1.9.0
 - CUDA version: 10.2
 - GPU models and configuration: T4

<!-- Add any other context about the problem here. -->


cc @gmagogsfm