I  encounter  a similar problem，and  when i run “torch.version.cuda” , i get the same response "9.0.176 ".
When i set batch size as 8 or smaller， it runs normally. But when i set batch size larger  than 8,  the same error occured.
Do you find the reason?