Fix build errors of GridSample and test failures in test_attention_fusion.py (#27642)
# Description
This PR addresses a build error and subsequent test failures related to
recent changes in GridSample and the transformer optimizer. Related PRs:
#27201, #27556.
## Changes
### 1. Fix GridSample Build Error
- Removed an unused local variable `mode_str` in
`onnxruntime/core/providers/cuda/tensor/grid_sample.cc` that was causing
a warning (treated as error) about shadowing a member variable.
- Ref:
[`grid_sample.cc`](https://github.com/microsoft/onnxruntime/blob/c979a2407f/onnxruntime/core/providers/cuda/tensor/grid_sample.cc#L54)
### 2. Update GridSample Tests
- Updated
`onnxruntime/test/providers/cpu/tensor/grid_sample_test_custom.inc` to
use default execution providers in `RunTests` instead of a hardcoded
opset version, ensuring compatibility across different environments.
### 3. Revert Transformer Fusion Fallback
- Reverted a recent change in
`onnxruntime/python/tools/transformers/fusion_skiplayernorm.py` that
enabled a fallback for `SkipLayerNormalization` fusion when symbolic
shape inference fails.
- This revert was necessary to avoid regressions in GPT-2 tests where
model definitions contain typos that intentionally (or coincidentally)
break shape inference.
- Ref:
[`fusion_skiplayernorm.py`](https://github.com/microsoft/onnxruntime/blob/c979a2407f/onnxruntime/python/tools/transformers/fusion_skiplayernorm.py#L113)
### 4. Restore Transformer Test Parity
- Updated
`onnxruntime/test/python/transformers/test_attention_fusion.py`
specifically `test_qwen3_normalization_fusion` to match the expected
node counts after reverting the fusion fallback.
- Ref:
[`test_attention_fusion.py`](https://github.com/microsoft/onnxruntime/blob/c979a2407f/onnxruntime/test/python/transformers/test_attention_fusion.py#L398)
## Verification
- `build_cuda.sh` completed successfully.
- `onnxruntime/test/python/transformers/test_attention_fusion.py` passes
with "OK".
- `lintrunner -a` reports no issues.