[export] Properly handle duplicated params. (#108415)
Summary:
Test Plan:
python benchmarks/dynamo/huggingface.py --bfloat16 --accuracy
--inference --device cuda --export --only BertForMaskedLM
python benchmarks/dynamo/huggingface.py --bfloat16 --accuracy
--inference --device cuda --export-aot-inductor --only BertForMaskedLM
Reviewers:
Subscribers:
Tasks:
Tags:
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/108415
Approved by: https://github.com/angelayi