I found that
optimizer.zero_grad()
loss = torch.mean(torch.sum(-onehot*pred, dim=1)) #CE loss
loss.backwrad()

until this, the conv1.weight.grad has zero gradients.
However, after i procede
optimizer.step()

the conv1.weight.grad was updated.
Thank you so much !!!