[dynamo] getattr for EnumVariables (#93397)
I'm not sure if this is the correct fix, but it allowed me to enable the test case I added which I encountered in an internal model.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/93397
Approved by: https://github.com/yanboliang