If you are not transferring the model and data to the GPU, your code will run on the CPU by default.
Use
device = 'cuda:0'
input = torch.randn(1000, 3, 224, 224).to(device)
conv1 = torch.Conv2d(3, 5, (3, 3)).to(device)
conv2 = torch.Conv2d(5, 7, (5, 5)).to(device)

to push input as well as both layers to the GPU before executing the forward pass.
nvidia-smi should not show any usage in your code snippet.
What kind of change did you see using nvidia-smi?