It seems your code raises a device mismatch error, i.e. the model and inputs are not both on the GPU.
Try to push both to the device via:
device = 'cuda:0'
model.to(device)
input = input.to(device)

before executing the model (or trying to export it).