[BE][EZ] Flatten preprocessor hierarchy (#120422)
Instead of
```cpp
#if defined(foo)
#else
#if defined(bar)
#else
#endif
#endif
```
use
```cpp
#if defined(foo)
#elif defined(bar)
#else
#endif
```
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/120422
Approved by: https://github.com/seemethere, https://github.com/kit1980, https://github.com/Skylion007